From patchwork Thu Jan 17 14:07:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2/2, FWTS-TEST] arg-table-path-0001: sort the source log to ensure LC_ALL=C sort ordering Date: Thu, 17 Jan 2013 04:07:51 -0000 From: Colin King X-Patchwork-Id: 213272 Message-Id: <1358431671-24638-3-git-send-email-colin.king@canonical.com> To: fwts-devel@lists.ubuntu.com From: Colin Ian King Ensure we compare sorted results against the sorted log. This fixes Signed-off-by: Colin Ian King Acked-by: Alex Hung Acked-by: Keng-Yu Lin --- arg-table-path-0001/test-0001.sh | 6 ++++-- arg-table-path-0001/test-0002.sh | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/arg-table-path-0001/test-0001.sh b/arg-table-path-0001/test-0001.sh index d3050f6..cad4af7 100755 --- a/arg-table-path-0001/test-0001.sh +++ b/arg-table-path-0001/test-0001.sh @@ -3,6 +3,7 @@ TEST="Test --table-path to load dumped tables produced by acpixtract" NAME=test-0001.sh TMPLOG=$TMP/acpidump.log.$$ +SORTED=$TMP/acpidump.log.sorted HERE=`pwd` # @@ -12,7 +13,8 @@ HERE=`pwd` # the output before we diff. # $FWTS --log-format="%line %owner " -w 80 --table-path=$HERE acpidump - | grep "^[0-9]*[ ]*acpidump" | cut -c7- | sort | uniq > $TMPLOG -diff $TMPLOG acpidump-0001.log >> $FAILURE_LOG +sort acpidump-0001.log > $SORTED +diff $TMPLOG $SORTED >> $FAILURE_LOG ret=$? if [ $ret -eq 0 ]; then echo PASSED: $TEST, $NAME @@ -20,5 +22,5 @@ else echo FAILED: $TEST, $NAME fi -rm $TMPLOG +rm $TMPLOG $SORTED exit $ret diff --git a/arg-table-path-0001/test-0002.sh b/arg-table-path-0001/test-0002.sh index 54906de..d9fb658 100755 --- a/arg-table-path-0001/test-0002.sh +++ b/arg-table-path-0001/test-0002.sh @@ -3,6 +3,7 @@ TEST="Test -T to load dumped tables produced by acpixtract" NAME=test-0002.sh TMPLOG=$TMP/acpidump.log.$$ +SORTED=$TMP/acpidump.log.sorted HERE=`pwd` # @@ -12,7 +13,8 @@ HERE=`pwd` # the output before we diff. # $FWTS --log-format="%line %owner " -w 80 -t $HERE acpidump - | grep "^[0-9]*[ ]*acpidump" | cut -c7- | sort | uniq > $TMPLOG -diff $TMPLOG acpidump-0001.log >> $FAILURE_LOG +sort acpidump-0001.log > $SORTED +diff $TMPLOG $SORTED >> $FAILURE_LOG ret=$? if [ $ret -eq 0 ]; then echo PASSED: $TEST, $NAME @@ -20,5 +22,5 @@ else echo FAILED: $TEST, $NAME fi -rm $TMPLOG +rm $TMPLOG $SORTED exit $ret