diff --git a/run_tests.py b/run_tests.py index 18fde7a617..67aafac269 100755 --- a/run_tests.py +++ b/run_tests.py @@ -25,6 +25,7 @@ def is_included(backend): cpp = is_included("cpp") c = is_included("c") wat = is_included("wat") + run = is_included("run") pass_ = test.get("pass", None) optimization_passes = ["flip_sign", "div_to_mul", "fma", "sign_from_value", "inline_function_calls", "loop_unroll", @@ -102,7 +103,9 @@ def is_included(backend): run_test(filename, "wat", "lpython --no-color --show-wat {infile}", filename, update_reference, extra_args) - + if run: + run_test(filename, "runtime", "lpython {infile}", + filename, update_reference, extra_args) if __name__ == "__main__": tester_main("LPython", single_test) diff --git a/tests/tests.toml b/tests/tests.toml index 30430629fe..66103e8029 100644 --- a/tests/tests.toml +++ b/tests/tests.toml @@ -4,6 +4,8 @@ # asr ... run the Semantics and output ASR, compare against reference version # llvm ... run the Semantics and output LLVM, compare against reference version # tokens ... output Tokens, compare against reference version +# run ... compiles and executes the specified file; +# checks both runtime errors and successful runs # tests