Change in pysim[master]: Fixup: Fix automated tests

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

dexter gerrit-no-reply at lists.osmocom.org
Tue Dec 31 17:00:09 UTC 2019


dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/16690 )


Change subject: Fixup: Fix automated tests
......................................................................

Fixup: Fix automated tests

The Change I12e6b46787efb39c5745f4e7f3cdcca9209881b8 was not as
effective as expected. Diff is used wrongly so that no lines are
compared. Lets fix this

Change-Id: I1601d8a2b3e1c07fe1eba375ea8deae3d50bbef0
---
M tests/pysim-test.sh
1 file changed, 5 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/90/16690/1

diff --git a/tests/pysim-test.sh b/tests/pysim-test.sh
index c3e1747..0d469c9 100755
--- a/tests/pysim-test.sh
+++ b/tests/pysim-test.sh
@@ -82,7 +82,9 @@
     # 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.
-    CARD_DIFF=$(diff + 1 $TEMPFILE ./$CARD_NAME.ok)
+    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)
     set -e
 
     if [ "$CARD_DIFF" != "" ]; then
@@ -95,13 +97,14 @@
 	echo "------------8<------------"
 	cat $TEMPFILE
 	echo "------------8<------------"
+	rm *.tmp
 	exit 1
     fi
 
     inc_card_list $CARD_NAME
 
     echo "Card contents match the test data -- success!"
-    rm $TEMPFILE
+    rm *.tmp
 }
 
 # Read out the card using pysim-read and store the result as .ok file. This

-- 
To view, visit https://gerrit.osmocom.org/c/pysim/+/16690
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I1601d8a2b3e1c07fe1eba375ea8deae3d50bbef0
Gerrit-Change-Number: 16690
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191231/8e6fce58/attachment.htm>


More information about the gerrit-log mailing list