Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
API: Remove legacy vlibsocket code.
[vpp.git]
/
test
/
run_tests.py
diff --git
a/test/run_tests.py
b/test/run_tests.py
index
158494a
..
02e4738
100644
(file)
--- a/
test/run_tests.py
+++ b/
test/run_tests.py
@@
-13,6
+13,7
@@
from debug import spawn_gdb
from log import global_logger
from discover_tests import discover_tests
from subprocess import check_output, CalledProcessError
from log import global_logger
from discover_tests import discover_tests
from subprocess import check_output, CalledProcessError
+from util import check_core_path
# timeout which controls how long the child has to finish after seeing
# a core dump in test temporary directory. If this is exceeded, parent assumes
# timeout which controls how long the child has to finish after seeing
# a core dump in test temporary directory. If this is exceeded, parent assumes
@@
-51,7
+52,10
@@
class Filter_by_class_list:
def suite_from_failed(suite, failed):
filter_cb = Filter_by_class_list(failed)
def suite_from_failed(suite, failed):
filter_cb = Filter_by_class_list(failed)
- return VppTestRunner.filter_tests(suite, filter_cb)
+ suite = VppTestRunner.filter_tests(suite, filter_cb)
+ if 0 == suite.countTestCases():
+ raise Exception("Suite is empty after filtering out the failed tests!")
+ return suite
def run_forked(suite):
def run_forked(suite):
@@
-136,6
+140,7
@@
def run_forked(suite):
if os.path.isfile(core_path):
global_logger.error("Core-file exists in test temporary "
"directory: %s!" % core_path)
if os.path.isfile(core_path):
global_logger.error("Core-file exists in test temporary "
"directory: %s!" % core_path)
+ check_core_path(global_logger, core_path)
global_logger.debug("Running `file %s':" % core_path)
try:
info = check_output(["file", core_path])
global_logger.debug("Running `file %s':" % core_path)
try:
info = check_output(["file", core_path])
@@
-194,10
+199,16
@@
if __name__ == '__main__':
retries = int(os.getenv("RETRIES", 0))
except ValueError:
retries = 0
retries = int(os.getenv("RETRIES", 0))
except ValueError:
retries = 0
+
+ try:
+ force_foreground = int(os.getenv("FORCE_FOREGROUND", 0))
+ except ValueError:
+ force_foreground = 0
attempts = retries + 1
if attempts > 1:
print("Perform %s attempts to pass the suite..." % attempts)
attempts = retries + 1
if attempts > 1:
print("Perform %s attempts to pass the suite..." % attempts)
- if (debug is not None and debug.lower() in ["gdb", "gdbserver"]) or step:
+ if (debug is not None and debug.lower() in ["gdb", "gdbserver"]) or step\
+ or force_foreground:
# don't fork if requiring interactive terminal..
sys.exit(not VppTestRunner(
verbosity=verbose, failfast=failfast).run(suite).wasSuccessful())
# don't fork if requiring interactive terminal..
sys.exit(not VppTestRunner(
verbosity=verbose, failfast=failfast).run(suite).wasSuccessful())