[PATCH][FWTS-TEST] fwts-test: arg-log-format-0001: make test less pedandic on line numbers

Colin King colin.king at canonical.com
Wed Mar 12 11:38:05 UTC 2014


From: Colin Ian King <colin.king at canonical.com>

Line numbers can change depending on arch and build specific information
dumped out at the start of the test.  So make this test less pedantic on
line number checking.  We are just interested in the format and not
the actual content of some fields.  This fixes build test failures on
ARM.

Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
 fwts-test/arg-log-format-0001/test-0001.sh | 4 ++--
 1 file 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 f0ba5ee..418c7c4 100755
--- a/fwts-test/arg-log-format-0001/test-0001.sh
+++ b/fwts-test/arg-log-format-0001/test-0001.sh
@@ -6,11 +6,11 @@ TMPLOG=$TMP/klog.log.$$
 TMPLOG_ORIG=$TMP/klog-0001.log.$$
 TODAY=`date +%d/%m/%y`
 
-$FWTS -w 80 -j $FWTSTESTDIR/../data --klog=$FWTSTESTDIR/arg-log-format-0001/klog.txt --log-format="%owner (%line) <%date> %field %level: " klog - | grep "^klog" > $TMPLOG
+$FWTS -w 80 -j $FWTSTESTDIR/../data --klog=$FWTSTESTDIR/arg-log-format-0001/klog.txt --log-format="%owner (%line) <%date> %field %level: " klog - | grep "^klog" | sed "sx([0-9][0-9][0-9][0-9][0-9])x(XXXXX)x" > $TMPLOG
 #
 #  Need to adjust reference log to today's date
 #
-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
+cat $FWTSTESTDIR/arg-log-format-0001/klog-0001.log | sed "sx<[0-9][0-9]\/[0-9][0-9]\/[0-9][0-9]>x<${TODAY}>x" | sed "sx([0-9][0-9][0-9][0-9][0-9])x(XXXXX)x" > $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