fun compile do
# find nitg
var nit_dir = toolcontext.nit_dir
- var nitg = "{nit_dir or else ""}/bin/nitg"
- if nit_dir == null or not nitg.file_exists then
+ var nitg = nit_dir/"bin/nitg"
+ if not nitg.file_exists then
toolcontext.error(null, "Cannot find nitg. Set envvar NIT_DIR.")
toolcontext.check_errors
end
if toolcontext.opt_noact.value then return
# execute
var file = test_file
- var res = sys.system("./{file}.bin > '{file}.out1' 2>&1 </dev/null")
+ var res = sys.system("{file.to_program_name}.bin > '{file}.out1' 2>&1 </dev/null")
var f = new IFStream.open("{file}.out1")
var msg = f.read_all
f.close
test_file = "{include_dir}/{test_file}"
end
if not test_file.file_exists then
- toolcontext.info("Skip test for {mmodule}, no file {test_file} found", 1)
+ toolcontext.info("Skip test for {mmodule}, no file {test_file} found", 2)
return ts
end
var tester = new NitUnitTester(self)
var res = tester.test_module_unit(test_file)
if res == null then
- toolcontext.info("Skip test for {mmodule}, no test suite found", 1)
+ toolcontext.info("Skip test for {mmodule}, no test suite found", 2)
return ts
end
return res.to_xml