Skip to content

Commit 46cec4f

Browse files
Use ad hoc shell code rather than run-test-suites.pl to run groups
This way we get a verbose report from the test suites and no noise from skipped suites. Also, this way, the code doesn't depend on the exact way run-test-suites.pl interpolates the --skip option into a regex. Signed-off-by: Gilles Peskine <[email protected]>
1 parent 43ebbc9 commit 46cec4f

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

tools/bin/mbedtls-prepare-build

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ class MakefileMaker:
463463
for com in commands:
464464
self.format('\t{}{}',
465465
('' if short is None else '$(Q)'),
466-
com.replace('\n', ' \\\n\t'))
466+
com.strip('\n').replace('\n', ' \\\n\t'))
467467
if help is not None:
468468
self.help[name] = help
469469
if phony:
@@ -1115,9 +1115,13 @@ class MakefileMaker:
11151115
"""
11161116
use_run_test_suites = False
11171117
for base, executables in groups.items():
1118-
short_base = re.sub(r'\Atest_suite_', r'', base)
1119-
skip_re = '(?!{})[A-Za-z_0-9]+'.format(short_base)
1120-
shell_code = '$(PERL) scripts/run-test-suites.pl --skip=\'{}\''.format(skip_re)
1118+
shell_code = '''
1119+
failures=;
1120+
for x in {}; do
1121+
./$$x || failures="$$failures $$x";
1122+
done;
1123+
if [ -n "$$failures" ]; then echo; echo "Failures:$$failures"; false; fi
1124+
'''.format(' '.join([re.sub(r'.*/', r'', exe) for exe in executables]))
11211125
self.target('tests/' + base + '.run',
11221126
groups[base] + ['tests/seedfile'],
11231127
['$(SETENV)cd tests && ' + shell_code],

0 commit comments

Comments
 (0)