[PATCH] fwts-test: arg-help-0001: don't check the version field
Colin King
colin.king at canonical.com
Mon Mar 17 15:48:20 UTC 2014
From: Colin Ian King <colin.king at canonical.com>
the original test was unfortunately including the version string
which changes every time we do a release. sed this out. Also,
test-0002 required a space before the final closing ].
Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
fwts-test/arg-help-0001/test-0001.sh | 5 +++--
fwts-test/arg-help-0001/test-0002.sh | 7 ++++---
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/fwts-test/arg-help-0001/test-0001.sh b/fwts-test/arg-help-0001/test-0001.sh
index f4f80be..4be4705 100755
--- a/fwts-test/arg-help-0001/test-0001.sh
+++ b/fwts-test/arg-help-0001/test-0001.sh
@@ -23,8 +23,9 @@ if [ $? -eq 1 ]; then
echo SKIP: $TEST, $NAME
exit 77
fi
-$FWTS -h | grep -v "Show version" | grep -v "Usage" > $TMPLOG
-diff $TMPLOG $FWTSTESTDIR/arg-help-0001/arg-help-0001.log >> $FAILURE_LOG
+$FWTS -h | grep -v "Show version" | grep -v "Usage" | sed s/\(V[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\)/\(Vxx\.xx\.xx\)/ > $TMPLOG
+sed s/\(V[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\)/\(Vxx\.xx\.xx\)/ < $FWTSTESTDIR/arg-help-0001/arg-help-0001.log > $TMP/help.log.$$.orig
+diff $TMPLOG $TMP/help.log.$$.orig >> $FAILURE_LOG
ret=$?
if [ $ret -eq 0 ]; then
echo PASSED: $TEST, $NAME
diff --git a/fwts-test/arg-help-0001/test-0002.sh b/fwts-test/arg-help-0001/test-0002.sh
index c3bfb24..d8b3815 100755
--- a/fwts-test/arg-help-0001/test-0002.sh
+++ b/fwts-test/arg-help-0001/test-0002.sh
@@ -24,15 +24,16 @@ if [ $? -eq 1 ]; then
exit 77
fi
-$FWTS --help | grep -v "Show version" | grep -v "Usage" > $TMPLOG
-diff $TMPLOG $FWTSTESTDIR/arg-help-0001/arg-help-0002.log >> $FAILURE_LOG
+$FWTS --help | grep -v "Show version" | grep -v "Usage" | sed s/\(V[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\)/\(Vxx\.xx\.xx\)/ > $TMPLOG
+sed s/\(V[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\)/\(Vxx\.xx\.xx\)/ < $FWTSTESTDIR/arg-help-0001/arg-help-0001.log > $TMP/help.log.$$.orig
+diff $TMPLOG $TMP/help.log.$$.orig >> $FAILURE_LOG
ret=$?
if [ $ret -eq 0 ]; then
echo PASSED: $TEST, $NAME
else
echo FAILED: $TEST, $NAME
fi
-if [ $cols -ne 0]; then
+if [ $cols -ne 0 ]; then
stty cols $cols 2> /dev/null
fi
tset 2> /dev/null
--
1.9.0
More information about the fwts-devel
mailing list