Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 9368 → Rev 9369

/kernel/trunk/test/common/__init__.py
77,16 → 77,6
def wait(self, seconds = 0.25):
time.sleep(seconds)
 
def get_file_directory(path):
path = path.replace("\\", "/")
if "/" in path:
folder = "/".join(path.split("/")[:-1])
if folder == "":
return "/" # It was a file in the root folder
return folder
else:
return "." # Just a filename, let's return current folder
 
def run_qemu(root_dir, test_dir, debug_log):
# Make local copy of IMG, so we will be able to run the test in parallel
if os.path.exists(f"{test_dir}/kolibri_test.img"): # If previous test run interrupted the file may be busy
104,7 → 94,7
flags += "-soundhw ac97 "
if is_win32():
qemu_full_path = shutil.which(qemu_command)
qemu_directory = get_file_directory(qemu_full_path)
qemu_directory = os.path.dirname(qemu_full_path)
flags += f"-L {qemu_directory} "
s = f"{qemu_command} {flags}"
qemu_stdout = open(f"{test_dir}/qemu_stdout.log", "w")