Commit 940aab51 authored by ufebl's avatar ufebl

Add option to only run big tests

parent d11425c1
......@@ -42,6 +42,8 @@ if True:#__name__ == '__main__':
help="Only run the tests that were incorrect the last run")
parser.add_argument("--all_exec_tests", action="store_true", default=False,
help="Run all exec (compile-firm...) tests, not only the small ones")
parser.add_argument("--only_big_tests", action="store_true", default=False,
help="Run only tests in the big folder")
parser.add_argument("--produce_no_reports", action="store_true", default=False,
help="Produce no long reports besides the command line output")
parser.add_argument("--produce_all_reports", action="store_true", default=False,
......
......@@ -80,7 +80,7 @@ class Environment:
produce_no_reports: bool = True, output_no_incorrect_reports: bool = False,
produce_all_reports: bool = False, report_subdir: str = None,
ci_testing: bool = False, color: bool = False,
all_exec_tests: bool = True, bench_compiler_flags: List[str]=[],
all_exec_tests: bool = True, only_big_tests: bool = False, bench_compiler_flags: List[str]=[],
bench_runs: int = 10):
if color:
force_colored_output()
......@@ -130,6 +130,7 @@ class Environment:
self._already_preprocessed_files = set()
self._pid_tmpdirs = {} # type: Dict[int, str]
self.only_small_exec_tests = not all_exec_tests
self.only_big_tests = only_big_tests
self.timeout = float(os.getenv("MJ_TIMEOUT", "10"))
self.big_timeout = float(os.getenv("MJ_BIG_TIMEOUT", "60"))
......
......@@ -131,6 +131,7 @@ class BenchExecTest(BasicSyntaxTest):
out, err, rtcode = self.env.run_command(self.env.mj_run_cmd, *(compiler_flag.split(" ") + [base_filename + ".java"]),
timeout=timeout)
if rtcode != 0:
_LOG.error("File \"{}\" can't be compile".format(self.preprocessed_file))
#test_result.incorrect_msg = "file can't be compiled"
#test_result.set_error_code(rtcode)
#test_result.add_long_text("Error output", err.decode())
......@@ -142,6 +143,7 @@ class BenchExecTest(BasicSyntaxTest):
else:
results.append(self._bench_command("./a.out", timeout=timeout, input_bytes=input_bytes))
except SigKill as sig:
_LOG.error("File \"{}\" can't be compile".format(self.preprocessed_file))
#test_result.incorrect_msg = "file can't be compiled: " + sig.name
#test_result.set_error_code(sig.retcode)
#test_result.add_file("Source file", self.preprocessed_file)
......
......@@ -67,6 +67,8 @@ class TestSuite:
dirname = os.path.dirname(base)
if root.startswith("."):
continue
elif not base.startswith("big") and get_test_dirname(mode) == "exec" and self.env.only_big_tests:
continue
if dir == root:
file_names.extend(files)
elif ".preprocessed" in base or (dirname.startswith(".") and dirname != "."):
......
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