X-Git-Url: http://nitlanguage.org diff --git a/src/nitunit.nit b/src/nitunit.nit index 996fe27..fe8fb7b 100644 --- a/src/nitunit.nit +++ b/src/nitunit.nit @@ -16,9 +16,11 @@ # see `testing/README` module nitunit +import frontend import testing var toolcontext = new ToolContext +toolcontext.keep_going = true toolcontext.option_context.add_option(toolcontext.opt_full, toolcontext.opt_output, toolcontext.opt_dir, toolcontext.opt_noact, toolcontext.opt_pattern, toolcontext.opt_autosav, toolcontext.opt_gen_unit, toolcontext.opt_gen_force, toolcontext.opt_gen_private, toolcontext.opt_gen_show, toolcontext.opt_nitc) toolcontext.tooldescription = "Usage: nitunit [OPTION]... ...\nExecutes the unit tests from Nit source files." @@ -59,6 +61,11 @@ if toolcontext.opt_gen_unit.value then exit(0) end +# When testing `nitunit`, disable time. +if "NIT_TESTING".environ != "" then + toolcontext.opt_no_time.value = true +end + "NIT_TESTING".setenv("true") "NIT_TESTING_ID".setenv(pid.to_s) "SRAND".setenv("0")