[PATCH 2/2][FWTS-TEST] arg-table-path-0001: sort the source log to ensure LC_ALL=C sort ordering
Keng-Yu Lin
kengyu at canonical.com
Fri Jan 18 09:22:53 UTC 2013
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 at canonical.com> wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> Ensure we compare sorted results against the sorted log. This fixes
>
> Signed-off-by: Colin Ian King <colin.king at 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 at canonical.com>
More information about the fwts-devel
mailing list