From patchwork Thu Jan 17 14:07:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Ian King X-Patchwork-Id: 213272 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 823282C0082 for ; Fri, 18 Jan 2013 01:07:57 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1Tvq8K-0000jT-BR; Thu, 17 Jan 2013 14:07:56 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1Tvq8G-0000j0-0Y for fwts-devel@lists.ubuntu.com; Thu, 17 Jan 2013 14:07:52 +0000 Received: from faun.canonical.com ([91.189.93.182] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1Tvq8F-0000G2-VC for fwts-devel@lists.ubuntu.com; Thu, 17 Jan 2013 14:07:51 +0000 From: Colin King To: fwts-devel@lists.ubuntu.com Subject: [PATCH 2/2][FWTS-TEST] arg-table-path-0001: sort the source log to ensure LC_ALL=C sort ordering Date: Thu, 17 Jan 2013 14:07:51 +0000 Message-Id: <1358431671-24638-3-git-send-email-colin.king@canonical.com> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1358431671-24638-1-git-send-email-colin.king@canonical.com> References: <1358431671-24638-1-git-send-email-colin.king@canonical.com> X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: fwts-devel-bounces@lists.ubuntu.com Errors-To: fwts-devel-bounces@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