def main(): target = Target() test_results = Results(target) test_results.log( target.execute('cat /sys/kernel/debug/sched_features | grep _WA_ ', as_root=True)) tests_to_run = [] # tests_to_run = ['SysBenchCpu', 'SysBenchMemory'] # tests_to_run = ['PerfBenchFutexWake'] time = 60 events = [ 'sched:sched_migrate_task', 'sched:sched_stick_numa', 'sched:sched_move_numa', 'sched:sched_swap_numa' ] events.extend(['migrate:mm_migrate_pages']) for test in test_registry.test_registry: if not tests_to_run or test(target).__class__.__name__ in tests_to_run: t = test(target, time=time) t.run_event(target, events, test_results) res_files = [] res_files.append(test_results.store('Res1')) res_files.append(test_results.store('Res2')) create_report(res_files, 'Report', 'Test Run')
def run_tests(test_name, target, tests_to_run): test_results = Results(target) sched_features = target.execute( 'cat /sys/kernel/debug/sched_features | grep WA_ ', as_root=True) for f in sched_features.split(" "): if "WA_" in f: test_results.log(f) for test in test_registry.test_registry: if not tests_to_run or test(target).__class__.__name__ in tests_to_run: test(target).run_event(target, 'sched:sched_migrate_task', test_results) return test_results.store(test_name)