mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 17:41:50 +00:00
tc-testing: Clarify the use of tdc's -d option
The -d command line argument to tdc requires the name of a physical device on the system where the tests will be run. If -d has not been used, tdc will skip tests that require a physical device. This patch is intended to better document what the -d option does and how it is used. Signed-off-by: Lucas Bates <lucasb@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
21947f467c
commit
0eba31ef5c
2 changed files with 11 additions and 5 deletions
|
@ -128,7 +128,9 @@ optional arguments:
|
||||||
-v, --verbose Show the commands that are being run
|
-v, --verbose Show the commands that are being run
|
||||||
-N, --notap Suppress tap results for command under test
|
-N, --notap Suppress tap results for command under test
|
||||||
-d DEVICE, --device DEVICE
|
-d DEVICE, --device DEVICE
|
||||||
Execute the test case in flower category
|
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)
|
||||||
-P, --pause Pause execution just before post-suite stage
|
-P, --pause Pause execution just before post-suite stage
|
||||||
|
|
||||||
selection:
|
selection:
|
||||||
|
|
|
@ -356,12 +356,14 @@ def test_runner(pm, args, filtered_tests):
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
for tidx in testlist:
|
for tidx in testlist:
|
||||||
if "flower" in tidx["category"] and args.device == None:
|
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:
|
if args.verbose > 1:
|
||||||
print('Not executing test {} {} because DEV2 not defined'.
|
print(errmsg)
|
||||||
format(tidx['id'], tidx['name']))
|
|
||||||
res = TestResult(tidx['id'], tidx['name'])
|
res = TestResult(tidx['id'], tidx['name'])
|
||||||
res.set_result(ResultState.skip)
|
res.set_result(ResultState.skip)
|
||||||
res.set_errormsg('Not executed because DEV2 is not defined')
|
res.set_errormsg(errmsg)
|
||||||
tsr.add_resultdata(res)
|
tsr.add_resultdata(res)
|
||||||
continue
|
continue
|
||||||
try:
|
try:
|
||||||
|
@ -499,7 +501,9 @@ def set_args(parser):
|
||||||
choices=['none', 'xunit', 'tap'],
|
choices=['none', 'xunit', 'tap'],
|
||||||
help='Specify the format for test results. (Default: TAP)')
|
help='Specify the format for test results. (Default: TAP)')
|
||||||
parser.add_argument('-d', '--device',
|
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(
|
parser.add_argument(
|
||||||
'-P', '--pause', action='store_true',
|
'-P', '--pause', action='store_true',
|
||||||
help='Pause execution just before post-suite stage')
|
help='Pause execution just before post-suite stage')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue