dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/38006?usp=email )
Change subject: pySim-prog_test: tolerate missing .data files ......................................................................
pySim-prog_test: tolerate missing .data files
When the test detects a card, but does not find the .data faile for it, then it fails. This can be a problem in case we want to intentionally exclude a specific card model.
Related: OS#6532 Change-Id: Iba196ada0076385de7bffcb157a85fda0a6c1852 --- M tests/pySim-prog_test/pySim-prog_test.sh 1 file changed, 10 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/06/38006/1
diff --git a/tests/pySim-prog_test/pySim-prog_test.sh b/tests/pySim-prog_test/pySim-prog_test.sh index e768d8f..215ebee 100755 --- a/tests/pySim-prog_test/pySim-prog_test.sh +++ b/tests/pySim-prog_test/pySim-prog_test.sh @@ -134,6 +134,11 @@ continue fi echo "Card is of type: $CARD_NAME" + + if ! [ -r "$CARD_NAME.data" ]; then + echo "Warning: no .data file for this card, skipping..." + continue + fi gen_ok_file $I $CARD_NAME done } @@ -163,6 +168,11 @@ ADM_HEX="" ADM_OPT="-a"
+ if ! [ -r "$CARD_NAME.data" ]; then + echo "Warning: no .data file for this card, skipping..." + continue + fi + source "$CARD_NAME.data" if [ -n "$ADM_HEX" ]; then ADM_OPT="-A"