diff options
Diffstat (limited to 'tools/testing/selftests/tc-testing/tdc.py')
| -rwxr-xr-x | tools/testing/selftests/tc-testing/tdc.py | 12 | 
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/testing/selftests/tc-testing/tdc.py b/tools/testing/selftests/tc-testing/tdc.py index f04321ace9fb..e566c70e64a1 100755 --- a/tools/testing/selftests/tc-testing/tdc.py +++ b/tools/testing/selftests/tc-testing/tdc.py @@ -356,12 +356,14 @@ def test_runner(pm, args, filtered_tests):      time.sleep(2)      for tidx in testlist:          if "flower" in tidx["category"] and args.device == None: +            errmsg = "Tests using the DEV2 variable must define the name of a " +            errmsg += "physical NIC with the -d option when running tdc.\n" +            errmsg += "Test has been skipped."              if args.verbose > 1: -                print('Not executing test {} {} because DEV2 not defined'. -                      format(tidx['id'], tidx['name'])) +                print(errmsg)              res = TestResult(tidx['id'], tidx['name'])              res.set_result(ResultState.skip) -            res.set_errormsg('Not executed because DEV2 is not defined') +            res.set_errormsg(errmsg)              tsr.add_resultdata(res)              continue          try: @@ -499,7 +501,9 @@ def set_args(parser):          choices=['none', 'xunit', 'tap'],          help='Specify the format for test results. (Default: TAP)')      parser.add_argument('-d', '--device', -                        help='Execute the test case in flower category') +                        help='Execute test cases that use a physical device, ' + +                        'where DEVICE is its name. (If not defined, tests ' + +                        'that require a physical device will be skipped)')      parser.add_argument(          '-P', '--pause', action='store_true',          help='Pause execution just before post-suite stage')  |