diff mbox

[fwts-test] remove log line numbers before diff

Message ID 1328522249-21588-1-git-send-email-kengyu@canonical.com
State Accepted
Headers show

Commit Message

Keng-Yu Lin Feb. 6, 2012, 9:57 a.m. UTC
Signed-off-by: Keng-Yu Lin <kengyu@canonical.com>
---
 dmesg_common-0001/test-0002.sh |    4 ++--
 klog-0001/test-0002.sh         |    4 ++--
 oops-0001/test-0002.sh         |    4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

Comments

Colin Ian King Feb. 6, 2012, 11:01 a.m. UTC | #1
On 06/02/12 09:57, Keng-Yu Lin wrote:
> Signed-off-by: Keng-Yu Lin<kengyu@canonical.com>
> ---
>   dmesg_common-0001/test-0002.sh |    4 ++--
>   klog-0001/test-0002.sh         |    4 ++--
>   oops-0001/test-0002.sh         |    4 ++--
>   3 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/dmesg_common-0001/test-0002.sh b/dmesg_common-0001/test-0002.sh
> index 97c2638..b32245c 100755
> --- a/dmesg_common-0001/test-0002.sh
> +++ b/dmesg_common-0001/test-0002.sh
> @@ -4,8 +4,8 @@ TEST="Test dmesg_common summary table against known failure patterns"
>   NAME=test-0002.sh
>   TMPLOG=$TMP/dmesg_common.log.$$
>
> -$FWTS -w 80 --klog=dmesg_common.txt dmesg_common - | grep summary| cut -c7->  $TMPLOG
> -diff $TMPLOG dmesg_common-0002.log>>  $FAILURE_LOG
> +$FWTS -w 80 --klog=dmesg_common.txt dmesg_common - | grep summary | grep -v "log line:" | cut -c7->  $TMPLOG
> +grep -v "log line:" dmesg_common-0002.log | diff $TMPLOG ->>  $FAILURE_LOG
>   ret=$?
>   if [ $ret -eq 0 ]; then
>   	echo PASSED: $TEST, $NAME
> diff --git a/klog-0001/test-0002.sh b/klog-0001/test-0002.sh
> index bc6279f..ff111c1 100755
> --- a/klog-0001/test-0002.sh
> +++ b/klog-0001/test-0002.sh
> @@ -4,8 +4,8 @@ TEST="Test klog summary table against known failure patterns"
>   NAME=test-0002.sh
>   TMPLOG=$TMP/klog.log.$$
>
> -$FWTS -w 80 --klog=klog.txt klog - | grep summary | cut -c7->  $TMPLOG
> -diff $TMPLOG klog-0002.log>>  $FAILURE_LOG
> +$FWTS -w 80 --klog=klog.txt klog - | grep summary | grep -v "log line:" | cut -c7->  $TMPLOG
> +grep -v "log line:" klog-0002.log | diff $TMPLOG ->>  $FAILURE_LOG
>   ret=$?
>   if [ $ret -eq 0 ]; then
>   	echo PASSED: $TEST, $NAME
> diff --git a/oops-0001/test-0002.sh b/oops-0001/test-0002.sh
> index 248ed24..eb43148 100755
> --- a/oops-0001/test-0002.sh
> +++ b/oops-0001/test-0002.sh
> @@ -4,8 +4,8 @@ TEST="Test oops summary table against known failure patterns"
>   NAME=test-0002.sh
>   TMPLOG=$TMP/oops.log.$$
>
> -$FWTS -w 80 --klog=oops.txt oops - | grep summary | cut -c7->  $TMPLOG
> -diff $TMPLOG oops-0002.log>>  $FAILURE_LOG
> +$FWTS -w 80 --klog=oops.txt oops - | grep summary | grep -v "log line:" | cut -c7->  $TMPLOG
> +grep -v "log line:" oops-0002.log | diff $TMPLOG ->>  $FAILURE_LOG
>   ret=$?
>   if [ $ret -eq 0 ]; then
>   	echo PASSED: $TEST, $NAME
Looks good to me. Thanks Keng-Yu

Acked-by: Colin King <colin.king@canonical.com>
Alex Hung Feb. 7, 2012, 7:52 a.m. UTC | #2
On 02/06/2012 05:57 PM, Keng-Yu Lin wrote:
> Signed-off-by: Keng-Yu Lin<kengyu@canonical.com>
> ---
>   dmesg_common-0001/test-0002.sh |    4 ++--
>   klog-0001/test-0002.sh         |    4 ++--
>   oops-0001/test-0002.sh         |    4 ++--
>   3 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/dmesg_common-0001/test-0002.sh b/dmesg_common-0001/test-0002.sh
> index 97c2638..b32245c 100755
> --- a/dmesg_common-0001/test-0002.sh
> +++ b/dmesg_common-0001/test-0002.sh
> @@ -4,8 +4,8 @@ TEST="Test dmesg_common summary table against known failure patterns"
>   NAME=test-0002.sh
>   TMPLOG=$TMP/dmesg_common.log.$$
>
> -$FWTS -w 80 --klog=dmesg_common.txt dmesg_common - | grep summary| cut -c7->  $TMPLOG
> -diff $TMPLOG dmesg_common-0002.log>>  $FAILURE_LOG
> +$FWTS -w 80 --klog=dmesg_common.txt dmesg_common - | grep summary | grep -v "log line:" | cut -c7->  $TMPLOG
> +grep -v "log line:" dmesg_common-0002.log | diff $TMPLOG ->>  $FAILURE_LOG
>   ret=$?
>   if [ $ret -eq 0 ]; then
>   	echo PASSED: $TEST, $NAME
> diff --git a/klog-0001/test-0002.sh b/klog-0001/test-0002.sh
> index bc6279f..ff111c1 100755
> --- a/klog-0001/test-0002.sh
> +++ b/klog-0001/test-0002.sh
> @@ -4,8 +4,8 @@ TEST="Test klog summary table against known failure patterns"
>   NAME=test-0002.sh
>   TMPLOG=$TMP/klog.log.$$
>
> -$FWTS -w 80 --klog=klog.txt klog - | grep summary | cut -c7->  $TMPLOG
> -diff $TMPLOG klog-0002.log>>  $FAILURE_LOG
> +$FWTS -w 80 --klog=klog.txt klog - | grep summary | grep -v "log line:" | cut -c7->  $TMPLOG
> +grep -v "log line:" klog-0002.log | diff $TMPLOG ->>  $FAILURE_LOG
>   ret=$?
>   if [ $ret -eq 0 ]; then
>   	echo PASSED: $TEST, $NAME
> diff --git a/oops-0001/test-0002.sh b/oops-0001/test-0002.sh
> index 248ed24..eb43148 100755
> --- a/oops-0001/test-0002.sh
> +++ b/oops-0001/test-0002.sh
> @@ -4,8 +4,8 @@ TEST="Test oops summary table against known failure patterns"
>   NAME=test-0002.sh
>   TMPLOG=$TMP/oops.log.$$
>
> -$FWTS -w 80 --klog=oops.txt oops - | grep summary | cut -c7->  $TMPLOG
> -diff $TMPLOG oops-0002.log>>  $FAILURE_LOG
> +$FWTS -w 80 --klog=oops.txt oops - | grep summary | grep -v "log line:" | cut -c7->  $TMPLOG
> +grep -v "log line:" oops-0002.log | diff $TMPLOG ->>  $FAILURE_LOG
>   ret=$?
>   if [ $ret -eq 0 ]; then
>   	echo PASSED: $TEST, $NAME
Acked by: Alex Hung <alex.hung@canonical.com>
diff mbox

Patch

diff --git a/dmesg_common-0001/test-0002.sh b/dmesg_common-0001/test-0002.sh
index 97c2638..b32245c 100755
--- a/dmesg_common-0001/test-0002.sh
+++ b/dmesg_common-0001/test-0002.sh
@@ -4,8 +4,8 @@  TEST="Test dmesg_common summary table against known failure patterns"
 NAME=test-0002.sh
 TMPLOG=$TMP/dmesg_common.log.$$
 
-$FWTS -w 80 --klog=dmesg_common.txt dmesg_common - | grep summary| cut -c7-  > $TMPLOG
-diff $TMPLOG dmesg_common-0002.log >> $FAILURE_LOG
+$FWTS -w 80 --klog=dmesg_common.txt dmesg_common - | grep summary | grep -v "log line:" | cut -c7-  > $TMPLOG
+grep -v "log line:" dmesg_common-0002.log | diff $TMPLOG - >> $FAILURE_LOG
 ret=$?
 if [ $ret -eq 0 ]; then 
 	echo PASSED: $TEST, $NAME
diff --git a/klog-0001/test-0002.sh b/klog-0001/test-0002.sh
index bc6279f..ff111c1 100755
--- a/klog-0001/test-0002.sh
+++ b/klog-0001/test-0002.sh
@@ -4,8 +4,8 @@  TEST="Test klog summary table against known failure patterns"
 NAME=test-0002.sh
 TMPLOG=$TMP/klog.log.$$
 
-$FWTS -w 80 --klog=klog.txt klog - | grep summary | cut -c7- > $TMPLOG
-diff $TMPLOG klog-0002.log >> $FAILURE_LOG
+$FWTS -w 80 --klog=klog.txt klog - | grep summary | grep -v "log line:" | cut -c7- > $TMPLOG
+grep -v "log line:" klog-0002.log | diff $TMPLOG - >> $FAILURE_LOG
 ret=$?
 if [ $ret -eq 0 ]; then 
 	echo PASSED: $TEST, $NAME
diff --git a/oops-0001/test-0002.sh b/oops-0001/test-0002.sh
index 248ed24..eb43148 100755
--- a/oops-0001/test-0002.sh
+++ b/oops-0001/test-0002.sh
@@ -4,8 +4,8 @@  TEST="Test oops summary table against known failure patterns"
 NAME=test-0002.sh
 TMPLOG=$TMP/oops.log.$$
 
-$FWTS -w 80 --klog=oops.txt oops - | grep summary | cut -c7- > $TMPLOG
-diff $TMPLOG oops-0002.log >> $FAILURE_LOG
+$FWTS -w 80 --klog=oops.txt oops - | grep summary | grep -v "log line:" | cut -c7- > $TMPLOG
+grep -v "log line:" oops-0002.log | diff $TMPLOG - >> $FAILURE_LOG
 ret=$?
 if [ $ret -eq 0 ]; then 
 	echo PASSED: $TEST, $NAME