a bit less broken stuff

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-01-22 00:00:00 +00:00
parent bf2a0d3caf
commit 022bbe970e
7 changed files with 103 additions and 63 deletions

View File

@@ -5,7 +5,7 @@ import sys
import common
class Main(common.LkmcCliFunction):
class Main(common.TestCliFunction):
def __init__(self):
super().__init__(
defaults={
@@ -27,6 +27,7 @@ If given, run only the given tests. Otherwise, run all tests.
def timed_main(self):
run = self.import_path_main('run')
run_args = self.get_common_args()
run_args['ctrl_c_host'] = True
if self.env['emulator'] == 'gem5':
run_args['userland_build_id'] = 'static'
if self.env['tests'] == []:
@@ -52,13 +53,7 @@ If given, run only the given tests. Otherwise, run all tests.
sources = self.env['tests']
for source in sources:
run_args['userland'] = source
run_args['background'] = True
test_id_string = self.test_setup(run_args, source)
exit_status = run(**run_args)
self.test_teardown(run)
if exit_status != 0:
self.log_error('test failed, program exit status: {} test id: {}'.format(exit_status, test_id_string))
sys.exit(1)
self.run_test(run, run_args, source)
if __name__ == '__main__':
Main().cli()