diff mbox series

[1/2] live-image: replace hard-coded "oem-tests.lst" by a variable

Message ID 20200205213447.18509-1-alex.hung@canonical.com
State Accepted
Headers show
Series [1/2] live-image: replace hard-coded "oem-tests.lst" by a variable | expand

Commit Message

Alex Hung Feb. 5, 2020, 9:34 p.m. UTC
---
 live-image/fwts-frontend-text | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Comments

Ivan Hu Feb. 24, 2020, 4:02 a.m. UTC | #1
On 2/6/20 5:34 AM, Alex Hung wrote:
> ---
>  live-image/fwts-frontend-text | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/live-image/fwts-frontend-text b/live-image/fwts-frontend-text
> index c7922aa4..7b16b981 100755
> --- a/live-image/fwts-frontend-text
> +++ b/live-image/fwts-frontend-text
> @@ -20,6 +20,7 @@
>  FWTS="Firmware Test Suite"
>  OPTIONS="/tmp/options.$$"
>  DIALOG_CMD="/tmp/fwts.cmd.$$"
> +OEM_TESTS_FILE="/fwts/oem-tests.lst"
>  export DIALOGRC="/usr/share/fwts/fwts-live-dialogrc"
>  
>  FWTS_DATE=`date +%d%m%Y`
> @@ -254,12 +255,12 @@ the directory: /fwts/$FWTS_DATE/$FWTS_TIME/results.log\n\nPress Enter to continu
>  #
>  check_run_oem_tests()
>  {
> -	if [ -f /fwts/oem-tests.lst ]; then
> +	if [ -f $OEM_TESTS_FILE ]; then
>  		cd $WORK_DIR >& /dev/null
> -		OEM_TESTS=$(echo $(grep TESTS /fwts/oem-tests.lst) | cut -d '=' -f 2)
> +		OEM_TESTS=$(echo $(grep TESTS $OEM_TESTS_FILE) | cut -d '=' -f 2)
>  		do_test "${OEM_TESTS}" 'Running OEM Specified Tests'
>  		fwts --dump > /dev/null
> -		POST_ACTION=$(echo $(grep POST /fwts/oem-tests.lst) | cut -d '=' -f 2)
> +		POST_ACTION=$(echo $(grep POST $OEM_TESTS_FILE) | cut -d '=' -f 2)
>  		if [ $POST_ACTION == "poweroff" ]; then
>  			dialog --backtitle "$FWTS" --infobox "Shutting down and powering off..." 5 80
>  		elif [ $POST_ACTION == "reboot" ]; then
> 


Acked-by: Ivan Hu <ivan.hu@canonical.com>
Colin Ian King Feb. 25, 2020, 8:27 a.m. UTC | #2
On 05/02/2020 21:34, Alex Hung wrote:
> ---
>  live-image/fwts-frontend-text | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/live-image/fwts-frontend-text b/live-image/fwts-frontend-text
> index c7922aa4..7b16b981 100755
> --- a/live-image/fwts-frontend-text
> +++ b/live-image/fwts-frontend-text
> @@ -20,6 +20,7 @@
>  FWTS="Firmware Test Suite"
>  OPTIONS="/tmp/options.$$"
>  DIALOG_CMD="/tmp/fwts.cmd.$$"
> +OEM_TESTS_FILE="/fwts/oem-tests.lst"
>  export DIALOGRC="/usr/share/fwts/fwts-live-dialogrc"
>  
>  FWTS_DATE=`date +%d%m%Y`
> @@ -254,12 +255,12 @@ the directory: /fwts/$FWTS_DATE/$FWTS_TIME/results.log\n\nPress Enter to continu
>  #
>  check_run_oem_tests()
>  {
> -	if [ -f /fwts/oem-tests.lst ]; then
> +	if [ -f $OEM_TESTS_FILE ]; then
>  		cd $WORK_DIR >& /dev/null
> -		OEM_TESTS=$(echo $(grep TESTS /fwts/oem-tests.lst) | cut -d '=' -f 2)
> +		OEM_TESTS=$(echo $(grep TESTS $OEM_TESTS_FILE) | cut -d '=' -f 2)
>  		do_test "${OEM_TESTS}" 'Running OEM Specified Tests'
>  		fwts --dump > /dev/null
> -		POST_ACTION=$(echo $(grep POST /fwts/oem-tests.lst) | cut -d '=' -f 2)
> +		POST_ACTION=$(echo $(grep POST $OEM_TESTS_FILE) | cut -d '=' -f 2)
>  		if [ $POST_ACTION == "poweroff" ]; then
>  			dialog --backtitle "$FWTS" --infobox "Shutting down and powering off..." 5 80
>  		elif [ $POST_ACTION == "reboot" ]; then
> 
Thanks Alex

Acked-by: Colin Ian King <colin.king@canonical.com>
diff mbox series

Patch

diff --git a/live-image/fwts-frontend-text b/live-image/fwts-frontend-text
index c7922aa4..7b16b981 100755
--- a/live-image/fwts-frontend-text
+++ b/live-image/fwts-frontend-text
@@ -20,6 +20,7 @@ 
 FWTS="Firmware Test Suite"
 OPTIONS="/tmp/options.$$"
 DIALOG_CMD="/tmp/fwts.cmd.$$"
+OEM_TESTS_FILE="/fwts/oem-tests.lst"
 export DIALOGRC="/usr/share/fwts/fwts-live-dialogrc"
 
 FWTS_DATE=`date +%d%m%Y`
@@ -254,12 +255,12 @@  the directory: /fwts/$FWTS_DATE/$FWTS_TIME/results.log\n\nPress Enter to continu
 #
 check_run_oem_tests()
 {
-	if [ -f /fwts/oem-tests.lst ]; then
+	if [ -f $OEM_TESTS_FILE ]; then
 		cd $WORK_DIR >& /dev/null
-		OEM_TESTS=$(echo $(grep TESTS /fwts/oem-tests.lst) | cut -d '=' -f 2)
+		OEM_TESTS=$(echo $(grep TESTS $OEM_TESTS_FILE) | cut -d '=' -f 2)
 		do_test "${OEM_TESTS}" 'Running OEM Specified Tests'
 		fwts --dump > /dev/null
-		POST_ACTION=$(echo $(grep POST /fwts/oem-tests.lst) | cut -d '=' -f 2)
+		POST_ACTION=$(echo $(grep POST $OEM_TESTS_FILE) | cut -d '=' -f 2)
 		if [ $POST_ACTION == "poweroff" ]; then
 			dialog --backtitle "$FWTS" --infobox "Shutting down and powering off..." 5 80
 		elif [ $POST_ACTION == "reboot" ]; then