Commit 5796bcd0 authored by Johannes Bechberger's avatar Johannes Bechberger

Reset current working directory in all mode

Fix #6
parent 8d30f89e
...@@ -96,9 +96,11 @@ if True:#__name__ == '__main__': ...@@ -96,9 +96,11 @@ if True:#__name__ == '__main__':
args["mode"] = new_mode args["mode"] = new_mode
if args["mode"] == "all": if args["mode"] == "all":
report_subdir = datetime.now().strftime("%d-%m-%y_%H-%M-%S") report_subdir = datetime.now().strftime("%d-%m-%y_%H-%M-%S")
cwd = os.path.realpath(".")
for mode in [TestMode.lexer, TestMode.syntax, TestMode.ast, TestMode.semantic, for mode in [TestMode.lexer, TestMode.syntax, TestMode.ast, TestMode.semantic,
TestMode.compile_firm_only, TestMode.compile_only, TestMode.compile_firm_only, TestMode.compile_only,
TestMode.compile_firm, TestMode.compile]: TestMode.compile_firm, TestMode.compile]:
os.chdir(cwd)
args["all_exec_tests"] = True args["all_exec_tests"] = True
args["report_subdir"] = report_subdir + "_" + mode args["report_subdir"] = report_subdir + "_" + mode
cprint("Run {} tests".format(mode), attrs=["bold"]) cprint("Run {} tests".format(mode), attrs=["bold"])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment