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
This commit is contained in:
Philipp Maier authored and laforge committed 2020-05-12 18:11:38 +00:00
1 parent b689754b49
commit ff84c23839
10 files changed
+32 -47

No files matched your search

+2 -8
View File
@@ -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