[PATCH][FWTS-TEST] fwts-test: fix tests not to compare against date (LP: #1289225)
Colin King
colin.king at canonical.com
Fri Mar 7 10:33:47 UTC 2014
From: Colin Ian King <colin.king at canonical.com>
Ignore the date field, make it the current date to always match the
current log generated at run time.
Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
fwts-test/arg-log-format-0001/test-0001.sh | 2 +-
fwts-test/arg-log-format-0001/test-0004.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fwts-test/arg-log-format-0001/test-0001.sh b/fwts-test/arg-log-format-0001/test-0001.sh
index d89c7b9..f0ba5ee 100755
--- a/fwts-test/arg-log-format-0001/test-0001.sh
+++ b/fwts-test/arg-log-format-0001/test-0001.sh
@@ -10,7 +10,7 @@ $FWTS -w 80 -j $FWTSTESTDIR/../data --klog=$FWTSTESTDIR/arg-log-format-0001/klog
#
# Need to adjust reference log to today's date
#
-sed sx10\/02\/14x${TODAY}x < $FWTSTESTDIR/arg-log-format-0001/klog-0001.log > $TMPLOG_ORIG
+sed "sx<[0-9][0-9]\/[0-9][0-9]\/[0-9][0-9]>x<${TODAY}>x" < $FWTSTESTDIR/arg-log-format-0001/klog-0001.log > $TMPLOG_ORIG
diff $TMPLOG $TMPLOG_ORIG >> $FAILURE_LOG
ret=$?
if [ $ret -eq 0 ]; then
diff --git a/fwts-test/arg-log-format-0001/test-0004.sh b/fwts-test/arg-log-format-0001/test-0004.sh
index bebf252..d285424 100755
--- a/fwts-test/arg-log-format-0001/test-0004.sh
+++ b/fwts-test/arg-log-format-0001/test-0004.sh
@@ -11,7 +11,7 @@ TODAY=`date +%d/%m/%y`
# Need to adjust reference log to today's date
#
$FWTS -w 80 -j $FWTSTESTDIR/../data --klog=$FWTSTESTDIR/arg-log-format-0001/klog.txt --log-format="%owner %date %%level: " klog - | grep "^klog" > $TMPLOG
-sed sx10\/10\/11x${TODAY}x < $FWTSTESTDIR/arg-log-format-0001/klog-0004.log > $TMPLOG_ORIG
+sed "sx[0-9][0-9]\/[0-9][0-9]\/[0-9][0-9]x${TODAY}x" < $FWTSTESTDIR/arg-log-format-0001/klog-0004.log > $TMPLOG_ORIG
diff $TMPLOG $TMPLOG_ORIG >> $FAILURE_LOG
ret=$?
if [ $ret -eq 0 ]; then
--
1.9.0
More information about the fwts-devel
mailing list