@classmethod
def setup_test_args(cls, preserve_indir=False, preserve_outdirs=False,
- toolpath=None, verbosity=None):
+ toolpath=None, verbosity=None, no_capture=False):
"""Accept arguments controlling test execution
Args:
cls.preserve_outdirs = preserve_outdirs
cls.toolpath = toolpath
cls.verbosity = verbosity
+ cls.no_capture = no_capture
def _CheckBintool(self, bintool):
if not bintool.is_present():
# Run the entry tests first ,since these need to be the first to import the
# 'entry' module.
result = test_util.run_test_suites(
- 'binman', debug, verbosity, test_preserve_dirs, processes, test_name,
- toolpath,
+ 'binman', debug, verbosity, False, test_preserve_dirs, processes,
+ test_name, toolpath,
[bintool_test.TestBintool, entry_test.TestEntry, ftest.TestFunctional,
fdt_test.TestFdt, elf_test.TestElf, image_test.TestImage,
cbfs_util_test.TestCbfs, fip_util_test.TestFip])
# Run the entry tests first ,since these need to be the first to import the
# 'entry' module.
result = test_util.run_test_suites(
- 'buildman', debug, verbose, False, args.threads, test_name, [],
+ 'buildman', debug, verbose, False, False, args.threads, test_name, [],
[test.TestBuild, func_test.TestFunctional, 'buildman.toolchain'])
return (0 if result.wasSuccessful() else 1)
test_dtoc.setup()
result = test_util.run_test_suites(
- toolname='dtoc', debug=True, verbosity=1, test_preserve_dirs=False,
- processes=processes, test_name=test_name, toolpath=[],
+ toolname='dtoc', debug=True, verbosity=1, no_capture=False,
+ test_preserve_dirs=False, processes=processes, test_name=test_name,
+ toolpath=[],
class_and_module_list=[test_dtoc.TestDtoc,test_src_scan.TestSrcScan])
return (0 if result.wasSuccessful() else 1)
"""
test_name = names[0] if names else None
result = test_util.run_test_suites(
- 'test_fdt', False, False, False, processes, test_name, None,
+ 'test_fdt', False, False, False, False, processes, test_name, None,
[TestFdt, TestNode, TestProp, TestFdtUtil])
return (0 if result.wasSuccessful() else 1)
from patman import test_checkpatch
result = test_util.run_test_suites(
- 'patman', False, False, False, None, None, None,
+ 'patman', False, False, False, False, None, None, None,
[test_checkpatch.TestPatch, func_test.TestFunctional,
'settings'])
from u_boot_pylib import test_util
result = test_util.run_test_suites(
- 'u_boot_pylib', False, False, False, None, None, None,
+ 'u_boot_pylib', False, False, False, False, None, None, None,
['terminal'])
sys.exit(0 if result.wasSuccessful() else 1)
import unittest
from u_boot_pylib import command
+from u_boot_pylib import terminal
use_concurrent = True
try:
super().addSkip(test, reason)
-def run_test_suites(toolname, debug, verbosity, test_preserve_dirs, processes,
- test_name, toolpath, class_and_module_list):
+def run_test_suites(toolname, debug, verbosity, no_capture, test_preserve_dirs,
+ processes, test_name, toolpath, class_and_module_list):
"""Run a series of test suites and collect the results
Args:
sys.argv.append('-D')
if verbosity:
sys.argv.append('-v%d' % verbosity)
+ if no_capture:
+ sys.argv.append('-N')
+ terminal.USE_CAPTURE = False
if toolpath:
for path in toolpath:
sys.argv += ['--toolpath', path]
setup_test_args = getattr(module, 'setup_test_args')
setup_test_args(preserve_indir=test_preserve_dirs,
preserve_outdirs=test_preserve_dirs and test_name is not None,
- toolpath=toolpath, verbosity=verbosity)
+ toolpath=toolpath, verbosity=verbosity, no_capture=no_capture)
if test_name:
# Since Python v3.5 If an ImportError or AttributeError occurs
# while traversing a name then a synthetic test that raises that