[KERNEL][TEST] Prepare for multithreading

git-svn-id: svn://kolibrios.org@9322 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Magomed Kostoev (mkostoevr) 2021-11-26 21:38:46 +00:00
parent 9ad8889fd4
commit 5175b0da3a

View File

@ -10,6 +10,7 @@ from shutil import which
import timeit import timeit
import urllib.request import urllib.request
import subprocess import subprocess
from threading import Thread
sys.path.append('test') sys.path.append('test')
import common import common
@ -130,18 +131,7 @@ def collect_tests():
tests.append(test_folder_path) tests.append(test_folder_path)
return tests return tests
if __name__ == "__main__": def run_tests_serially(tests, root_dir):
root_dir = os.getcwd()
# Check available tools
tools = (("qemu-system-i386", "qemu-system-x86"),
("fasm", "fasm"))
check_tools(tools)
prepare_test_img()
tests = collect_tests()
# Execute each test
test_number = 1 test_number = 1
for test in tests: for test in tests:
test_dir = f"{root_dir}/{test}" test_dir = f"{root_dir}/{test}"
@ -162,4 +152,15 @@ if __name__ == "__main__":
os.chdir(root_dir) os.chdir(root_dir)
test_number += 1 test_number += 1
if __name__ == "__main__":
root_dir = os.getcwd()
# Check available tools
tools = (("qemu-system-i386", "qemu-system-x86"),
("fasm", "fasm"))
check_tools(tools)
prepare_test_img()
tests = collect_tests()
run_tests_serially(tests, root_dir)