test: add option to rerun failed tests only
This commit is contained in:
@@ -115,7 +115,7 @@ class TestBaseClass:
|
||||
if self.options.cmds:
|
||||
print_cmds(cmds)
|
||||
return
|
||||
|
||||
base_dir = os.sep.join(os.path.abspath(__file__).replace(os.path.pathsep, '/').split('/')[:-3])
|
||||
final_return = 0
|
||||
total_tests = len(cmds)
|
||||
passed = 0
|
||||
@@ -131,7 +131,13 @@ class TestBaseClass:
|
||||
print("running test case: " + case_string)
|
||||
print_case_in_file(case_string, out)
|
||||
progress += 1
|
||||
ret = subprocess.call(cmd, shell=True, env=self.my_env, stdout=outstream, stderr=out)
|
||||
ret = subprocess.call(cmd,
|
||||
shell=True,
|
||||
env=self.my_env,
|
||||
stdout=outstream,
|
||||
stderr=out,
|
||||
cwd=base_dir
|
||||
)
|
||||
if not ret:
|
||||
passed += 1
|
||||
else:
|
||||
|
||||
@@ -139,7 +139,7 @@ daily-build-test-optimized-valgrind:
|
||||
dependencies: []
|
||||
variables:
|
||||
MODE: optimized
|
||||
VALGRIND_FLAG: -g
|
||||
VALGRIND_FLAG: -g --verbose-failed
|
||||
FORCE_TESTS: Force
|
||||
tags:
|
||||
- nsnam
|
||||
@@ -157,7 +157,7 @@ weekly-build-test-debug-valgrind:
|
||||
dependencies: []
|
||||
variables:
|
||||
MODE: debug
|
||||
VALGRIND_FLAG: -g
|
||||
VALGRIND_FLAG: -g --verbose-failed
|
||||
FORCE_TESTS: Force
|
||||
tags:
|
||||
- nsnam
|
||||
@@ -175,7 +175,7 @@ weekly-build-test-default-valgrind:
|
||||
dependencies: []
|
||||
variables:
|
||||
MODE: default
|
||||
VALGRIND_FLAG: -g
|
||||
VALGRIND_FLAG: -g --verbose-failed
|
||||
FORCE_TESTS: Force
|
||||
tags:
|
||||
- nsnam
|
||||
@@ -193,7 +193,7 @@ weekly-build-test-optimized-valgrind:
|
||||
dependencies: []
|
||||
variables:
|
||||
MODE: optimized
|
||||
VALGRIND_FLAG: -g
|
||||
VALGRIND_FLAG: -g --verbose-failed
|
||||
FORCE_TESTS: Force
|
||||
tags:
|
||||
- nsnam
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
# NOTE: Run this script with the Python3 interpreter if the python3 compatibility
|
||||
# of the ns-3 unit test runner needs to be tested.
|
||||
|
||||
# The following options of test.py are being tested for poratability by this script.
|
||||
# The following options of test.py are being tested for portability by this script.
|
||||
# To see the options supported by this script, run with the -h option on the command line
|
||||
#
|
||||
# -h, --help show this help message and exit
|
||||
@@ -84,7 +84,8 @@ def main(argv):
|
||||
'--example=socket-options-ipv6',
|
||||
'-u',
|
||||
'--update-data',
|
||||
'-f EXTENSIVE --fullness=EXTENSIVE'
|
||||
'-f EXTENSIVE',
|
||||
'--fullness=EXTENSIVE',
|
||||
'-g',
|
||||
'--grind',
|
||||
'-l',
|
||||
@@ -97,17 +98,17 @@ def main(argv):
|
||||
'--pyexample=first',
|
||||
'-r',
|
||||
'--retain',
|
||||
'-s ns3-tcp-interoperability',
|
||||
'--suite=ns3-tcp-interoperability',
|
||||
'-s ns3-tcp-state',
|
||||
'--suite=ns3-tcp-state',
|
||||
'-t t_opt.txt',
|
||||
'--text=t_opt.txt && rm -rf t_opt.txt',
|
||||
'--text=t_opt.txt && rm t_opt.txt',
|
||||
'-v',
|
||||
'--verbose',
|
||||
'-w t_opt.html && rm -rf t_opt.html',
|
||||
'--web=t_opt.html && rm -rf t_opt.html',
|
||||
'--html=t_opt.html && rm -rf t_opt.html',
|
||||
'-x t_opt.xml && rm -rf t_opt.xml',
|
||||
'--xml=t_opt.xml && rm -rf t_opt.xml',
|
||||
'-w t_opt.html && rm t_opt.html',
|
||||
'--web=t_opt.html && rm t_opt.html',
|
||||
'--html=t_opt.html && rm t_opt.html',
|
||||
'-x t_opt.xml && rm t_opt.xml',
|
||||
'--xml=t_opt.xml && rm t_opt.xml',
|
||||
]
|
||||
|
||||
configure_string = sys.executable + ' ns3 configure --enable-tests --enable-examples'
|
||||
|
||||
Reference in New Issue
Block a user