On 11/21/2011 05:16 PM, Chris Evich wrote:
> The usage documentation for html_report.py referred to an incorrect
> (probably old) name.  It provided and example usage statement, but
> assumed the default path.  Now it reports itself as whatever the
> actualy filename is, and the example path is relative to how
> it was actaully called.

Looks good, applied, thanks!

> Signed-off-by: Chris Evich<[email protected]>
> ---
>   client/tools/html_report.py |   13 +++++++++----
>   1 files changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/client/tools/html_report.py b/client/tools/html_report.py
> index 50f2d9b..29a09e6 100755
> --- a/client/tools/html_report.py
> +++ b/client/tools/html_report.py
> @@ -1637,12 +1637,17 @@ def usage():
>       """
>       Print stand alone program usage.
>       """
> -    print 'usage:',
> -    print 'make_html_report.py -r<result_directory>  [-f output_file] [-R]'
> -    print '(e.g. make_html_reporter.py -r '\
> -          '/usr/local/autotest/client/results/default -f /tmp/myreport.html)'
> +    called_as = os.path.abspath(sys.argv[0])
> +    bn = os.path.basename(called_as) # keep print statements short also
> +    rs = os.path.join(\
> +        os.path.split(os.path.dirname(called_as))[0], 'results', 'default' \
> +    )
> +    print 'usage: ' + bn + ' -r<result_directory>  [-f output_file] [-R]'
> +    print
>       print 'add "-R" for an html report with relative-paths (relative '\
>             'to results directory)'
> +    print
> +    print 'e.g. ' + bn + ' -r ' + rs + ' -f /tmp/myreport.html'
>       print ''
>       sys.exit(1)
>

_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to