[PATCH] fwts-test: arg-help-0001: modify regex to match upper/lower case version
Colin King
colin.king at canonical.com
Fri May 8 08:59:18 UTC 2015
From: Colin Ian King <colin.king at canonical.com>
It seems that this test breaks if we have a lowercase version tag,
such as v15.03.01 that slipped into the previous release. While we should
probably not allow lower case version tags it does seem sensible to make
the test more flexible to also match lower case version tags just in
case this happens again in the future.
Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
fwts-test/arg-help-0001/test-0001.sh | 6 +++---
fwts-test/arg-help-0001/test-0002.sh | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/fwts-test/arg-help-0001/test-0001.sh b/fwts-test/arg-help-0001/test-0001.sh
index 4be4705..38b3dbb 100755
--- a/fwts-test/arg-help-0001/test-0001.sh
+++ b/fwts-test/arg-help-0001/test-0001.sh
@@ -23,8 +23,8 @@ if [ $? -eq 1 ]; then
echo SKIP: $TEST, $NAME
exit 77
fi
-$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
+$FWTS -h | grep -v "Show version" | grep -v "Usage" | sed s/\([Vv][0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\)/\(Vxx\.xx\.xx\)/ > $TMPLOG
+sed s/\([Vv][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
@@ -35,5 +35,5 @@ fi
stty cols 80 2> /dev/null
tset 2> /dev/null
-rm $TMPLOG
+#rm $TMPLOG
exit $ret
diff --git a/fwts-test/arg-help-0001/test-0002.sh b/fwts-test/arg-help-0001/test-0002.sh
index fffef38..81f2ee6 100755
--- a/fwts-test/arg-help-0001/test-0002.sh
+++ b/fwts-test/arg-help-0001/test-0002.sh
@@ -24,8 +24,8 @@ if [ $? -eq 1 ]; then
exit 77
fi
-$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-0002.log > $TMP/help.log.$$.orig
+$FWTS --help | grep -v "Show version" | grep -v "Usage" | sed s/\([Vv][0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\)/\(Vxx\.xx\.xx\)/ > $TMPLOG
+sed s/\([Vv][0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\)/\(Vxx\.xx\.xx\)/ < $FWTSTESTDIR/arg-help-0001/arg-help-0002.log > $TMP/help.log.$$.orig
diff $TMPLOG $TMP/help.log.$$.orig >> $FAILURE_LOG
ret=$?
if [ $ret -eq 0 ]; then
--
2.1.4
More information about the fwts-devel
mailing list