mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-27 15:58:34 +03:00
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
This commit is contained in:
@@ -82,7 +82,9 @@ function check_card {
|
|||||||
# pysim would print the device number of the reader and we do not
|
# 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
|
# want the test to fail just because the card is put into a different
|
||||||
# reader device.
|
# 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
|
set -e
|
||||||
|
|
||||||
if [ "$CARD_DIFF" != "" ]; then
|
if [ "$CARD_DIFF" != "" ]; then
|
||||||
@@ -95,13 +97,14 @@ function check_card {
|
|||||||
echo "------------8<------------"
|
echo "------------8<------------"
|
||||||
cat $TEMPFILE
|
cat $TEMPFILE
|
||||||
echo "------------8<------------"
|
echo "------------8<------------"
|
||||||
|
rm *.tmp
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
inc_card_list $CARD_NAME
|
inc_card_list $CARD_NAME
|
||||||
|
|
||||||
echo "Card contents match the test data -- success!"
|
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
|
# Read out the card using pysim-read and store the result as .ok file. This
|
||||||
|
|||||||
Reference in New Issue
Block a user