[PATCH] 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
Chris Van Hoof
vanhoof at canonical.com
Mon Jun 11 22:30:56 UTC 2012
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 at 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 at 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.
More information about the fwts-devel
mailing list