Can terminate the program if the compiler is not found
# Compile a unit file and return the compiler return code
#
# Can terminate the program if the compiler is not found
private fun compile_unitfile(file: String): Int
do
var mmodule = self.mmodule
var nitc = toolcontext.find_nitc
var opts = new Array[String]
if mmodule != null then
# FIXME playing this way with the include dir is not safe nor robust
opts.add "-I {mmodule.filepath.as(not null).dirname}"
end
var cmd = "{nitc} --ignore-visibility --no-color -q '{file}' {opts.join(" ")} >'{file}.out1' 2>&1 </dev/null -o '{file}.bin'"
var res = toolcontext.safe_exec(cmd)
return res
end
src/testing/testing_doc.nit:291,2--306,4