Patchwork live-image/fwts-frontend-text: adding support for both html and plaintext logging by default and updating a symbolic link at the top level WORK_DIR to the latest results.html for quick access after testing

login
register
mail settings
Submitter Chris Van Hoof
Date June 11, 2012, 7:10 p.m.
Message ID <1339441854-10482-1-git-send-email-vanhoof@canonical.com>
Download mbox | patch
Permalink /patch/164239/
State Rejected
Headers show

Comments

Chris Van Hoof - June 11, 2012, 7:10 p.m.
Signed-off-by: Chris Van Hoof <vanhoof@canonical.com>
---
 live-image/fwts-frontend-text |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
Colin King - June 11, 2012, 10:16 p.m.
On 11/06/12 20:10, Chris Van Hoof wrote:
> Signed-off-by: Chris Van Hoof <vanhoof@canonical.com>
> ---
>   live-image/fwts-frontend-text |   11 +++++++++--
>   1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/live-image/fwts-frontend-text b/live-image/fwts-frontend-text
> index b9c0c1f..9ccac5d 100755
> --- a/live-image/fwts-frontend-text
> +++ b/live-image/fwts-frontend-text
> @@ -76,7 +76,7 @@ do_test()
>   	num_tests=`fwts $1 --show-tests | wc -l`
>   	num_tests=$((num_tests - 1))
>   	if [ $num_tests -gt 0 ]; then
> -  		fwts --force-clean --skip-test=s3,s4 $1 --show-progress-dialog | dialog --backtitle "$FWTS" --title "$2" --gauge "" 13 80 0
> +  		fwts --force-clean --skip-test=s3,s4 $1 --show-progress-dialog --log-type plaintext,html | dialog --backtitle "$FWTS" --title "$2" --gauge "" 13 80 0
>   	fi
>   }
>
> @@ -130,7 +130,7 @@ select_tests()
>   				dialog --backtitle "$FWTS" --title "No Tests Selected!" --msgbox \
>   			"   You did not select any tests to be run." 5 50
>   			else
> -  				fwts --force-clean $run_tests --show-progress-dialog | dialog  --backtitle "$FWTS" --title "$2" --gauge "" 15 80 0
> +  				fwts --force-clean $run_tests --show-progress-dialog --log-type plaintext,html | dialog  --backtitle "$FWTS" --title "$2" --gauge "" 15 80 0
>   				done_tests_finish
>   			fi
>   			;;
> @@ -195,6 +195,13 @@ no_tests_finish()
>   #
>   done_tests_finish()
>   {
> +    if [ -n "${CASPER_DETECTED:+x}" ]; then
> +        cd $WORK_DIR
> +        ln -sf ./results.html ../../results.html
> +    else
> +        ln -sf $WORK_DIR/results.html /fwts/
> +    fi
> +
>   	dialog  --backtitle "$FWTS" --title "Testing Complete" --yesno \
>   "The results can be found on the USB stick in the\n
>   the directory: /fwts/$FWTS_DATE/$FWTS_TIME/results.log\n\n
>

Normally I'd ask for this to be broken into two patches, but it is small 
enough to be OK for one patch.  Looks OK to me.

Acked-by: Colin Ian King <colin.king@canonical.com>
Chris Van Hoof - June 11, 2012, 10:30 p.m.
On 06/11/2012 06:16 PM, Colin Ian King wrote:
> On 11/06/12 20:10, Chris Van Hoof wrote:
>> Signed-off-by: Chris Van Hoof <vanhoof@canonical.com>
>> ---
>>   live-image/fwts-frontend-text |   11 +++++++++--
>>   1 file changed, 9 insertions(+), 2 deletions(-)
>>
>> diff --git a/live-image/fwts-frontend-text
>> b/live-image/fwts-frontend-text
>> index b9c0c1f..9ccac5d 100755
>> --- a/live-image/fwts-frontend-text
>> +++ b/live-image/fwts-frontend-text
>> @@ -76,7 +76,7 @@ do_test()
>>       num_tests=`fwts $1 --show-tests | wc -l`
>>       num_tests=$((num_tests - 1))
>>       if [ $num_tests -gt 0 ]; then
>> -          fwts --force-clean --skip-test=s3,s4 $1
>> --show-progress-dialog | dialog --backtitle "$FWTS" --title "$2"
>> --gauge "" 13 80 0
>> +          fwts --force-clean --skip-test=s3,s4 $1
>> --show-progress-dialog --log-type plaintext,html | dialog --backtitle
>> "$FWTS" --title "$2" --gauge "" 13 80 0
>>       fi
>>   }
>>
>> @@ -130,7 +130,7 @@ select_tests()
>>                   dialog --backtitle "$FWTS" --title "No Tests
>> Selected!" --msgbox \
>>               "   You did not select any tests to be run." 5 50
>>               else
>> -                  fwts --force-clean $run_tests
>> --show-progress-dialog | dialog  --backtitle "$FWTS" --title "$2"
>> --gauge "" 15 80 0
>> +                  fwts --force-clean $run_tests
>> --show-progress-dialog --log-type plaintext,html | dialog  --backtitle
>> "$FWTS" --title "$2" --gauge "" 15 80 0
>>                   done_tests_finish
>>               fi
>>               ;;
>> @@ -195,6 +195,13 @@ no_tests_finish()
>>   #
>>   done_tests_finish()
>>   {
>> +    if [ -n "${CASPER_DETECTED:+x}" ]; then
>> +        cd $WORK_DIR
>> +        ln -sf ./results.html ../../results.html
>> +    else
>> +        ln -sf $WORK_DIR/results.html /fwts/
>> +    fi
>> +
>>       dialog  --backtitle "$FWTS" --title "Testing Complete" --yesno \
>>   "The results can be found on the USB stick in the\n
>>   the directory: /fwts/$FWTS_DATE/$FWTS_TIME/results.log\n\n
>>
> 
> Normally I'd ask for this to be broken into two patches, but it is small
> enough to be OK for one patch.  Looks OK to me.
> 
> Acked-by: Colin Ian King <colin.king@canonical.com>

Happy to do so if you would like, the second hunk is really just to sort
out where I drop the symlink based on booting via fwts-live or running
on a local machine.
Colin King - June 11, 2012, 10:42 p.m.
On 11/06/12 23:30, Chris Van Hoof wrote:
> On 06/11/2012 06:16 PM, Colin Ian King wrote:
>> On 11/06/12 20:10, Chris Van Hoof wrote:
>>> Signed-off-by: Chris Van Hoof <vanhoof@canonical.com>
>>> ---
>>>    live-image/fwts-frontend-text |   11 +++++++++--
>>>    1 file changed, 9 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/live-image/fwts-frontend-text
>>> b/live-image/fwts-frontend-text
>>> index b9c0c1f..9ccac5d 100755
>>> --- a/live-image/fwts-frontend-text
>>> +++ b/live-image/fwts-frontend-text
>>> @@ -76,7 +76,7 @@ do_test()
>>>        num_tests=`fwts $1 --show-tests | wc -l`
>>>        num_tests=$((num_tests - 1))
>>>        if [ $num_tests -gt 0 ]; then
>>> -          fwts --force-clean --skip-test=s3,s4 $1
>>> --show-progress-dialog | dialog --backtitle "$FWTS" --title "$2"
>>> --gauge "" 13 80 0
>>> +          fwts --force-clean --skip-test=s3,s4 $1
>>> --show-progress-dialog --log-type plaintext,html | dialog --backtitle
>>> "$FWTS" --title "$2" --gauge "" 13 80 0
>>>        fi
>>>    }
>>>
>>> @@ -130,7 +130,7 @@ select_tests()
>>>                    dialog --backtitle "$FWTS" --title "No Tests
>>> Selected!" --msgbox \
>>>                "   You did not select any tests to be run." 5 50
>>>                else
>>> -                  fwts --force-clean $run_tests
>>> --show-progress-dialog | dialog  --backtitle "$FWTS" --title "$2"
>>> --gauge "" 15 80 0
>>> +                  fwts --force-clean $run_tests
>>> --show-progress-dialog --log-type plaintext,html | dialog  --backtitle
>>> "$FWTS" --title "$2" --gauge "" 15 80 0
>>>                    done_tests_finish
>>>                fi
>>>                ;;
>>> @@ -195,6 +195,13 @@ no_tests_finish()
>>>    #
>>>    done_tests_finish()
>>>    {
>>> +    if [ -n "${CASPER_DETECTED:+x}" ]; then
>>> +        cd $WORK_DIR
>>> +        ln -sf ./results.html ../../results.html
>>> +    else
>>> +        ln -sf $WORK_DIR/results.html /fwts/
>>> +    fi
>>> +
>>>        dialog  --backtitle "$FWTS" --title "Testing Complete" --yesno \
>>>    "The results can be found on the USB stick in the\n
>>>    the directory: /fwts/$FWTS_DATE/$FWTS_TIME/results.log\n\n
>>>
>>
>> Normally I'd ask for this to be broken into two patches, but it is small
>> enough to be OK for one patch.  Looks OK to me.
>>
>> Acked-by: Colin Ian King <colin.king@canonical.com>
>
> Happy to do so if you would like, the second hunk is really just to sort
> out where I drop the symlink based on booting via fwts-live or running
> on a local machine.
>
If it's not a big deal and you have some spare time, then please do.  I 
just like patches to be logically separated if possible

Colin
Chris Van Hoof - June 11, 2012, 10:50 p.m.
On 06/11/2012 03:10 PM, Chris Van Hoof wrote:
> Signed-off-by: Chris Van Hoof <vanhoof@canonical.com>
> ---
>  live-image/fwts-frontend-text |   11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/live-image/fwts-frontend-text b/live-image/fwts-frontend-text
> index b9c0c1f..9ccac5d 100755
> --- a/live-image/fwts-frontend-text
> +++ b/live-image/fwts-frontend-text
> @@ -76,7 +76,7 @@ do_test()
>  	num_tests=`fwts $1 --show-tests | wc -l`
>  	num_tests=$((num_tests - 1))
>  	if [ $num_tests -gt 0 ]; then
> -  		fwts --force-clean --skip-test=s3,s4 $1 --show-progress-dialog | dialog --backtitle "$FWTS" --title "$2" --gauge "" 13 80 0
> +  		fwts --force-clean --skip-test=s3,s4 $1 --show-progress-dialog --log-type plaintext,html | dialog --backtitle "$FWTS" --title "$2" --gauge "" 13 80 0
>  	fi
>  }
>  
> @@ -130,7 +130,7 @@ select_tests()
>  				dialog --backtitle "$FWTS" --title "No Tests Selected!" --msgbox \
>  			"   You did not select any tests to be run." 5 50
>  			else
> -  				fwts --force-clean $run_tests --show-progress-dialog | dialog  --backtitle "$FWTS" --title "$2" --gauge "" 15 80 0
> +  				fwts --force-clean $run_tests --show-progress-dialog --log-type plaintext,html | dialog  --backtitle "$FWTS" --title "$2" --gauge "" 15 80 0
>  				done_tests_finish
>  			fi
>  			;;
> @@ -195,6 +195,13 @@ no_tests_finish()
>  #
>  done_tests_finish()
>  {
> +    if [ -n "${CASPER_DETECTED:+x}" ]; then
> +        cd $WORK_DIR
> +        ln -sf ./results.html ../../results.html
> +    else
> +        ln -sf $WORK_DIR/results.html /fwts/
> +    fi
> +        
>  	dialog  --backtitle "$FWTS" --title "Testing Complete" --yesno \
>  "The results can be found on the USB stick in the\n
>  the directory: /fwts/$FWTS_DATE/$FWTS_TIME/results.log\n\n

Sending an updated patch-set with these two changes split into separate
patches.

--chris
Chris Van Hoof - June 11, 2012, 11:03 p.m.
On 06/11/2012 06:42 PM, Colin Ian King wrote:
> On 11/06/12 23:30, Chris Van Hoof wrote:
>> On 06/11/2012 06:16 PM, Colin Ian King wrote:
>>> On 11/06/12 20:10, Chris Van Hoof wrote:
>>>> Signed-off-by: Chris Van Hoof <vanhoof@canonical.com>
>>>> ---
>>>>    live-image/fwts-frontend-text |   11 +++++++++--
>>>>    1 file changed, 9 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/live-image/fwts-frontend-text
>>>> b/live-image/fwts-frontend-text
>>>> index b9c0c1f..9ccac5d 100755
>>>> --- a/live-image/fwts-frontend-text
>>>> +++ b/live-image/fwts-frontend-text
>>>> @@ -76,7 +76,7 @@ do_test()
>>>>        num_tests=`fwts $1 --show-tests | wc -l`
>>>>        num_tests=$((num_tests - 1))
>>>>        if [ $num_tests -gt 0 ]; then
>>>> -          fwts --force-clean --skip-test=s3,s4 $1
>>>> --show-progress-dialog | dialog --backtitle "$FWTS" --title "$2"
>>>> --gauge "" 13 80 0
>>>> +          fwts --force-clean --skip-test=s3,s4 $1
>>>> --show-progress-dialog --log-type plaintext,html | dialog --backtitle
>>>> "$FWTS" --title "$2" --gauge "" 13 80 0
>>>>        fi
>>>>    }
>>>>
>>>> @@ -130,7 +130,7 @@ select_tests()
>>>>                    dialog --backtitle "$FWTS" --title "No Tests
>>>> Selected!" --msgbox \
>>>>                "   You did not select any tests to be run." 5 50
>>>>                else
>>>> -                  fwts --force-clean $run_tests
>>>> --show-progress-dialog | dialog  --backtitle "$FWTS" --title "$2"
>>>> --gauge "" 15 80 0
>>>> +                  fwts --force-clean $run_tests
>>>> --show-progress-dialog --log-type plaintext,html | dialog  --backtitle
>>>> "$FWTS" --title "$2" --gauge "" 15 80 0
>>>>                    done_tests_finish
>>>>                fi
>>>>                ;;
>>>> @@ -195,6 +195,13 @@ no_tests_finish()
>>>>    #
>>>>    done_tests_finish()
>>>>    {
>>>> +    if [ -n "${CASPER_DETECTED:+x}" ]; then
>>>> +        cd $WORK_DIR
>>>> +        ln -sf ./results.html ../../results.html
>>>> +    else
>>>> +        ln -sf $WORK_DIR/results.html /fwts/
>>>> +    fi
>>>> +
>>>>        dialog  --backtitle "$FWTS" --title "Testing Complete" --yesno \
>>>>    "The results can be found on the USB stick in the\n
>>>>    the directory: /fwts/$FWTS_DATE/$FWTS_TIME/results.log\n\n
>>>>
>>>
>>> Normally I'd ask for this to be broken into two patches, but it is small
>>> enough to be OK for one patch.  Looks OK to me.
>>>
>>> Acked-by: Colin Ian King <colin.king@canonical.com>
>>
>> Happy to do so if you would like, the second hunk is really just to sort
>> out where I drop the symlink based on booting via fwts-live or running
>> on a local machine.
>>
> If it's not a big deal and you have some spare time, then please do.  I
> just like patches to be logically separated if possible
> 
> Colin

Just sent v2 ;)

Patch

diff --git a/live-image/fwts-frontend-text b/live-image/fwts-frontend-text
index b9c0c1f..9ccac5d 100755
--- a/live-image/fwts-frontend-text
+++ b/live-image/fwts-frontend-text
@@ -76,7 +76,7 @@  do_test()
 	num_tests=`fwts $1 --show-tests | wc -l`
 	num_tests=$((num_tests - 1))
 	if [ $num_tests -gt 0 ]; then
-  		fwts --force-clean --skip-test=s3,s4 $1 --show-progress-dialog | dialog --backtitle "$FWTS" --title "$2" --gauge "" 13 80 0
+  		fwts --force-clean --skip-test=s3,s4 $1 --show-progress-dialog --log-type plaintext,html | dialog --backtitle "$FWTS" --title "$2" --gauge "" 13 80 0
 	fi
 }
 
@@ -130,7 +130,7 @@  select_tests()
 				dialog --backtitle "$FWTS" --title "No Tests Selected!" --msgbox \
 			"   You did not select any tests to be run." 5 50
 			else
-  				fwts --force-clean $run_tests --show-progress-dialog | dialog  --backtitle "$FWTS" --title "$2" --gauge "" 15 80 0
+  				fwts --force-clean $run_tests --show-progress-dialog --log-type plaintext,html | dialog  --backtitle "$FWTS" --title "$2" --gauge "" 15 80 0
 				done_tests_finish
 			fi
 			;;
@@ -195,6 +195,13 @@  no_tests_finish()
 #
 done_tests_finish()
 {
+    if [ -n "${CASPER_DETECTED:+x}" ]; then
+        cd $WORK_DIR
+        ln -sf ./results.html ../../results.html
+    else
+        ln -sf $WORK_DIR/results.html /fwts/
+    fi
+        
 	dialog  --backtitle "$FWTS" --title "Testing Complete" --yesno \
 "The results can be found on the USB stick in the\n
 the directory: /fwts/$FWTS_DATE/$FWTS_TIME/results.log\n\n