aboutsummaryrefslogtreecommitdiff
path: root/tools/patman/test_util.py
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-07-24 08:42:06 -0400
committerTom Rini <trini@konsulko.com>2020-07-24 08:42:06 -0400
commit7208396bbf1df1c7a85d263b7ff054e6b45d8240 (patch)
tree41b20866e0a94e34ca76e54a2745ca7a5ba0889b /tools/patman/test_util.py
parent5d3a21df6694ebd66d5c34c9d62a26edc7456fc7 (diff)
downloadu-boot-7208396bbf1df1c7a85d263b7ff054e6b45d8240.zip
u-boot-7208396bbf1df1c7a85d263b7ff054e6b45d8240.tar.gz
u-boot-7208396bbf1df1c7a85d263b7ff054e6b45d8240.tar.bz2
Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"
This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing changes made to 56d37f1c564107e27d873181d838571b7d7860e7. Unfortunately this is causing CI failures: https://travis-ci.org/github/trini/u-boot/jobs/711313649 Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'tools/patman/test_util.py')
-rw-r--r--tools/patman/test_util.py21
1 files changed, 8 insertions, 13 deletions
diff --git a/tools/patman/test_util.py b/tools/patman/test_util.py
index 4e26175..aac58fb 100644
--- a/tools/patman/test_util.py
+++ b/tools/patman/test_util.py
@@ -16,14 +16,12 @@ from io import StringIO
use_concurrent = True
try:
- from concurrencytest.concurrencytest import ConcurrentTestSuite
- from concurrencytest.concurrencytest import fork_for_tests
+ from concurrencytest import ConcurrentTestSuite, fork_for_tests
except:
use_concurrent = False
-def RunTestCoverage(prog, filter_fname, exclude_list, build_dir, required=None,
- extra_args=None):
+def RunTestCoverage(prog, filter_fname, exclude_list, build_dir, required=None):
"""Run tests and check that we get 100% coverage
Args:
@@ -36,8 +34,6 @@ def RunTestCoverage(prog, filter_fname, exclude_list, build_dir, required=None,
calculation
build_dir: Build directory, used to locate libfdt.py
required: List of modules which must be in the coverage report
- extra_args (str): Extra arguments to pass to the tool before the -t/test
- arg
Raises:
ValueError if the code coverage is not 100%
@@ -51,14 +47,13 @@ def RunTestCoverage(prog, filter_fname, exclude_list, build_dir, required=None,
glob_list = []
glob_list += exclude_list
glob_list += ['*libfdt.py', '*site-packages*', '*dist-packages*']
- glob_list += ['*concurrencytest*']
- test_cmd = 'test' if 'binman' in prog or 'patman' in prog else '-t'
+ test_cmd = 'test' if 'binman' in prog else '-t'
prefix = ''
if build_dir:
prefix = 'PYTHONPATH=$PYTHONPATH:%s/sandbox_spl/tools ' % build_dir
cmd = ('%spython3-coverage run '
- '--omit "%s" %s %s %s -P1' % (prefix, ','.join(glob_list),
- prog, extra_args or '', test_cmd))
+ '--omit "%s" %s %s -P1' % (prefix, ','.join(glob_list),
+ prog, test_cmd))
os.system(cmd)
stdout = command.Output('python3-coverage', 'report')
lines = stdout.splitlines()
@@ -128,12 +123,12 @@ def ReportResult(toolname:str, test_name: str, result: unittest.TestResult):
for test, err in result.failures:
print(err, result.failures)
if result.skipped:
- print('%d %s test%s SKIPPED:' % (len(result.skipped), toolname,
- 's' if len(result.skipped) > 1 else ''))
+ print('%d binman test%s SKIPPED:' %
+ (len(result.skipped), 's' if len(result.skipped) > 1 else ''))
for skip_info in result.skipped:
print('%s: %s' % (skip_info[0], skip_info[1]))
if result.errors or result.failures:
- print('%s tests FAILED' % toolname)
+ print('binman tests FAILED')
return 1
return 0