Message ID | 1358431671-24638-3-git-send-email-colin.king@canonical.com |
---|---|
State | Accepted |
Headers | show |
On 01/17/2013 10:07 PM, Colin King wrote: > From: Colin Ian King <colin.king@canonical.com> > > Ensure we compare sorted results against the sorted log. This fixes > > Signed-off-by: Colin Ian King <colin.king@canonical.com> > --- > 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 > Acked-by: Alex Hung <alex.hung@canonical.com>
Hi Colin, Is some comment text cut in the middle? I can add it back when applying. On Thu, Jan 17, 2013 at 10:07 PM, Colin King <colin.king@canonical.com> wrote: > From: Colin Ian King <colin.king@canonical.com> > > Ensure we compare sorted results against the sorted log. This fixes > > Signed-off-by: Colin Ian King <colin.king@canonical.com> > --- > 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 > -- > 1.8.0 > > Acked-by: Keng-Yu Lin <kengyu@canonical.com>
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