[KERNEL][TEST] Make qemu tests position-independent

git-svn-id: svn://kolibrios.org@9331 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
2021-11-27 09:46:44 +00:00
parent 134e54dcbb
commit b61452e9e1
3 changed files with 17 additions and 18 deletions

View File

@@ -150,11 +150,10 @@ def run_tests_serially_thread(test, root_dir):
for test in tests:
test_dir = f"{root_dir}/{test}"
os.chdir(test_dir)
print(f"[{test_number}/{len(tests)}] {test}... ", end = "", flush=True)
start = timeit.default_timer()
try:
SourceFileLoader("test", "test.py").load_module().run()
SourceFileLoader("test", f"{test_dir}/test.py").load_module().run(root_dir, test_dir)
except common.TestTimeoutException:
result = "TIMEOUT"
except common.TestFailureException:
@@ -163,7 +162,6 @@ def run_tests_serially_thread(test, root_dir):
result = "SUCCESS"
finish = timeit.default_timer()
print(f"{result} ({finish - start:.2f} seconds)")
os.chdir(root_dir)
test_number += 1