mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-26 03:31:36 +01:00
a bit less broken stuff
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user