aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2020-05-12 17:24:18 +0200
committerlaforge <laforge@osmocom.org>2020-05-12 18:11:38 +0000
commitff84c238390606d92eefc0f5342079178c5f8de6 (patch)
treeb2cb6b77a8e2a1dde3dee9e7f8239fb2bc8384e5 /tests
parentb689754b4967eed6185352c36c3c17cac6702969 (diff)
pySim-prog, pySim-read, do not echo reader id
pySim-prog and pySim-read currently echo back the pcsc reader id (or baudrate/socket, depending on the interface used). This makes the output unecessarly undeterministic, which becomes a problem when verifying the putput in tests. Lets not echo those variable, user supplied parameters back. Also lets move the code that does the initalization to utils, so that it can be used from pySim-prog and from pySim-read (code dup). Change-Id: I243cc332f075d007b1c111292effcc610e874eb3 Related: OS#4503
Diffstat (limited to 'tests')
-rwxr-xr-xtests/pysim-test.sh10
1 files changed, 2 insertions, 8 deletions
diff --git a/tests/pysim-test.sh b/tests/pysim-test.sh
index a22c372..7ee9834 100755
--- a/tests/pysim-test.sh
+++ b/tests/pysim-test.sh
@@ -78,13 +78,7 @@ function check_card {
stat ./$CARD_NAME.ok > /dev/null
python $PYSIM_READ -p $TERMINAL > $TEMPFILE
set +e
- # Note: We ignore the first line of output in the diff because here
- # pysim would print the device number of the reader and we do not
- # want the test to fail just because the card is put into a different
- # reader device.
- tail -n +2 $CARD_NAME.ok > $CARD_NAME.ok.tmp
- tail -n +2 $TEMPFILE > $CARD_NAME.chk.tmp
- CARD_DIFF=$(diff $CARD_NAME.chk.tmp $CARD_NAME.ok.tmp)
+ CARD_DIFF=$(diff $TEMPFILE ./$CARD_NAME.ok)
set -e
if [ "$CARD_DIFF" != "" ]; then
@@ -104,7 +98,7 @@ function check_card {
inc_card_list $CARD_NAME
echo "Card contents match the test data -- success!"
- rm *.tmp
+ rm $TEMPFILE
}
# Read out the card using pysim-read and store the result as .ok file. This