# Test to be executed after the whole test suite.
var after_module: nullable TestCase = null
- fun show_status
- do
+ # Display test suite status in std-out.
+ fun show_status do
toolcontext.show_unit_status("Test-suite of module " + mmodule.full_name, test_cases)
end
# Execute the test suite
fun run do
+ set_env
show_status
if not toolcontext.test_dir.file_exists then
toolcontext.test_dir.mkdir
end
end
+ # Set environment variables for test suite execution
+ fun set_env do
+ var loc = mmodule.location.file
+ if loc == null then return
+ toolcontext.set_testing_path(loc.filename)
+ end
+
# Error occured during test-suite compilation.
var failure: nullable String = null
end
var res_name = "{test_file}_{method_name.escape_to_c}"
var clock = new Clock
var res = toolcontext.safe_exec("{test_file}.bin {method_name} > '{res_name}.out1' 2>&1 </dev/null")
- real_time = clock.total
+ if not toolcontext.opt_no_time.value then real_time = clock.total
var raw_output = "{res_name}.out1".to_path.read_all
self.raw_output = raw_output