Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
tests: fix FORCE_FOREGROUND
[vpp.git]
/
test
/
run_tests.py
diff --git
a/test/run_tests.py
b/test/run_tests.py
index
55b8123
..
58ca7d5
100644
(file)
--- a/
test/run_tests.py
+++ b/
test/run_tests.py
@@
-733,7
+733,10
@@
if __name__ == '__main__':
step = os.getenv("STEP", "n").lower() in ("y", "yes", "1")
step = os.getenv("STEP", "n").lower() in ("y", "yes", "1")
- run_interactive = debug or step
+ force_foreground = os.getenv("FORCE_FOREGROUND", "").lower() in \
+ ("y", "yes", "1")
+
+ run_interactive = debug or step or force_foreground
test_jobs = os.getenv("TEST_JOBS", "1").lower() # default = 1 process
if test_jobs == 'auto':
test_jobs = os.getenv("TEST_JOBS", "1").lower() # default = 1 process
if test_jobs == 'auto':
@@
-806,6
+809,7
@@
if __name__ == '__main__':
if run_interactive and suites:
# don't fork if requiring interactive terminal
if run_interactive and suites:
# don't fork if requiring interactive terminal
+ print('Running tests in foreground in the current process')
full_suite = unittest.TestSuite()
map(full_suite.addTests, suites)
result = VppTestRunner(verbosity=verbose,
full_suite = unittest.TestSuite()
map(full_suite.addTests, suites)
result = VppTestRunner(verbosity=verbose,
@@
-824,6
+828,8
@@
if __name__ == '__main__':
sys.exit(not was_successful)
else:
sys.exit(not was_successful)
else:
+ print('Running each VPPTestCase in a separate background process'
+ ' with {} parallel process(es)'.format(concurrent_tests))
exit_code = 0
while suites and attempts > 0:
results = run_forked(suites)
exit_code = 0
while suites and attempts > 0:
results = run_forked(suites)