diff mbox

fwts-test/arg-help-0001: ensure tty is reset on exit path

Message ID 1463387114-13417-1-git-send-email-colin.king@canonical.com
State Accepted
Headers show

Commit Message

Colin Ian King May 16, 2016, 8:25 a.m. UTC
From: Colin Ian King <colin.king@canonical.com>

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 fwts-test/arg-help-0001/test-0001.sh | 1 +
 fwts-test/arg-help-0001/test-0002.sh | 5 +++--
 2 files changed, 4 insertions(+), 2 deletions(-)

Comments

Alex Hung May 16, 2016, 8:35 a.m. UTC | #1
On 05/16/2016 04:25 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   fwts-test/arg-help-0001/test-0001.sh | 1 +
>   fwts-test/arg-help-0001/test-0002.sh | 5 +++--
>   2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/fwts-test/arg-help-0001/test-0001.sh b/fwts-test/arg-help-0001/test-0001.sh
> index 846707d..5f236e6 100755
> --- a/fwts-test/arg-help-0001/test-0001.sh
> +++ b/fwts-test/arg-help-0001/test-0001.sh
> @@ -20,6 +20,7 @@ cols=$(stty -a | tr ';' '\n' | grep "columns" | cut -d' ' -f3) 2> /dev/null
>   #
>   stty cols 50 2> /dev/null
>   if [ $? -eq 1 ]; then
> +	tset 2> /dev/null
>   	echo SKIP: $TEST, $NAME
>   	exit 77
>   fi
> diff --git a/fwts-test/arg-help-0001/test-0002.sh b/fwts-test/arg-help-0001/test-0002.sh
> index a144c44..c802e13 100755
> --- a/fwts-test/arg-help-0001/test-0002.sh
> +++ b/fwts-test/arg-help-0001/test-0002.sh
> @@ -20,8 +20,9 @@ cols=$(stty -a | tr ';' '\n' | grep "columns" | cut -d' ' -f3) 2> /dev/null
>   #
>   stty cols 50 2> /dev/null
>   if [ $? -eq 1 ]; then
> -        echo SKIP: $TEST, $NAME
> -        exit 77
> +	tset 2> /dev/null
> +	echo SKIP: $TEST, $NAME
> +	exit 77
>   fi
>
>   $FWTS --help | grep -v "Show version" | grep -v "Usage" | sed s/\([Vv][0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\)/\(Vxx\.xx\.xx\)/  > $TMPLOG
>

Acked-by: Alex Hung <alex.hung@canonical.com>
Ivan Hu May 17, 2016, 7:53 a.m. UTC | #2
On 05/16/2016 04:25 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   fwts-test/arg-help-0001/test-0001.sh | 1 +
>   fwts-test/arg-help-0001/test-0002.sh | 5 +++--
>   2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/fwts-test/arg-help-0001/test-0001.sh b/fwts-test/arg-help-0001/test-0001.sh
> index 846707d..5f236e6 100755
> --- a/fwts-test/arg-help-0001/test-0001.sh
> +++ b/fwts-test/arg-help-0001/test-0001.sh
> @@ -20,6 +20,7 @@ cols=$(stty -a | tr ';' '\n' | grep "columns" | cut -d' ' -f3) 2> /dev/null
>   #
>   stty cols 50 2> /dev/null
>   if [ $? -eq 1 ]; then
> +	tset 2> /dev/null
>   	echo SKIP: $TEST, $NAME
>   	exit 77
>   fi
> diff --git a/fwts-test/arg-help-0001/test-0002.sh b/fwts-test/arg-help-0001/test-0002.sh
> index a144c44..c802e13 100755
> --- a/fwts-test/arg-help-0001/test-0002.sh
> +++ b/fwts-test/arg-help-0001/test-0002.sh
> @@ -20,8 +20,9 @@ cols=$(stty -a | tr ';' '\n' | grep "columns" | cut -d' ' -f3) 2> /dev/null
>   #
>   stty cols 50 2> /dev/null
>   if [ $? -eq 1 ]; then
> -        echo SKIP: $TEST, $NAME
> -        exit 77
> +	tset 2> /dev/null
> +	echo SKIP: $TEST, $NAME
> +	exit 77
>   fi
>   
>   $FWTS --help | grep -v "Show version" | grep -v "Usage" | sed s/\([Vv][0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\)/\(Vxx\.xx\.xx\)/  > $TMPLOG

Acked-by: Ivan Hu <ivan.hu@canonical.com>
diff mbox

Patch

diff --git a/fwts-test/arg-help-0001/test-0001.sh b/fwts-test/arg-help-0001/test-0001.sh
index 846707d..5f236e6 100755
--- a/fwts-test/arg-help-0001/test-0001.sh
+++ b/fwts-test/arg-help-0001/test-0001.sh
@@ -20,6 +20,7 @@  cols=$(stty -a | tr ';' '\n' | grep "columns" | cut -d' ' -f3) 2> /dev/null
 #
 stty cols 50 2> /dev/null
 if [ $? -eq 1 ]; then
+	tset 2> /dev/null
 	echo SKIP: $TEST, $NAME
 	exit 77
 fi
diff --git a/fwts-test/arg-help-0001/test-0002.sh b/fwts-test/arg-help-0001/test-0002.sh
index a144c44..c802e13 100755
--- a/fwts-test/arg-help-0001/test-0002.sh
+++ b/fwts-test/arg-help-0001/test-0002.sh
@@ -20,8 +20,9 @@  cols=$(stty -a | tr ';' '\n' | grep "columns" | cut -d' ' -f3) 2> /dev/null
 #
 stty cols 50 2> /dev/null
 if [ $? -eq 1 ]; then
-        echo SKIP: $TEST, $NAME
-        exit 77
+	tset 2> /dev/null
+	echo SKIP: $TEST, $NAME
+	exit 77
 fi
 
 $FWTS --help | grep -v "Show version" | grep -v "Usage" | sed s/\([Vv][0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\)/\(Vxx\.xx\.xx\)/  > $TMPLOG