[Fuego] [PATCH 2/2] ftc: add global name 'board_name'

Daniel Sangorrin daniel.sangorrin at toshiba.co.jp
Thu May 24 07:03:57 UTC 2018


Ouch I was touching this part of the code and didn't notice Tim's recent commits.
Tim: no plans on using argparse?

> -----Original Message-----
> From: fuego-bounces at lists.linuxfoundation.org
> [mailto:fuego-bounces at lists.linuxfoundation.org] On Behalf Of Liu Wenlong
> Sent: Thursday, May 24, 2018 3:27 PM
> To: fuego at lists.linuxfoundation.org
> Subject: [Fuego] [PATCH 2/2] ftc: add global name 'board_name'
> 
> Fix the following runtime error,
> $ ftc run-test -b intel-up2 -t Functional.bc -s default
>   Notice: non-Jenkins test request detected
>   Traceback (most recent call last):
>     File "/usr/local/bin/ftc", line 4393, in <module>
>       main()
>     File "/usr/local/bin/ftc", line 4353, in main
>       do_run_test(conf, options)
>     File "/usr/local/bin/ftc", line 3152, in do_run_test
>       print "Running test '%s' on board '%s' using spec '%s'" % (test_name,
> board_name, spec_name)
>   NameError: global name 'board_name' is not defined
> 
> Signed-off-by: Liu Wenlong <liuwl.fnst at cn.fujitsu.com>
> ---
>  engine/scripts/ftc | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/engine/scripts/ftc b/engine/scripts/ftc
> index d66eddd..191f163 100755
> --- a/engine/scripts/ftc
> +++ b/engine/scripts/ftc
> @@ -3076,7 +3076,7 @@ def get_board_arg(cmd, conf, options):
>      options.remove(board_name)
>      options.remove('-b')
>      board = boards[board_name]
> -    return (board, options)
> +    return (board, board_name, options)
> 
>  # returns (test, options) with the test argument removed
>  def get_test_arg(cmd, conf, options):
> @@ -3097,7 +3097,7 @@ def get_test_arg(cmd, conf, options):
>  def do_run_test(conf, options):
>      global log, tail_fd
> 
> -    board, options = get_board_arg("Run-test", conf, options)
> +    board, board_name, options = get_board_arg("Run-test", conf, options)
> 
>      test_name = None
>      if '-t' in options:
> --
> 2.7.4
> 
> 
> 
> _______________________________________________
> Fuego mailing list
> Fuego at lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/fuego





More information about the Fuego mailing list