X-Git-Url: http://nitlanguage.org diff --git a/src/nitunit.nit b/src/nitunit.nit index e86f92f..0d89dc6 100644 --- a/src/nitunit.nit +++ b/src/nitunit.nit @@ -20,7 +20,7 @@ import testing var toolcontext = new ToolContext -toolcontext.option_context.add_option(toolcontext.opt_full, toolcontext.opt_output, toolcontext.opt_dir, toolcontext.opt_noact, toolcontext.opt_pattern, toolcontext.opt_file, toolcontext.opt_gen_unit, toolcontext.opt_gen_force, toolcontext.opt_gen_private, toolcontext.opt_gen_show) +toolcontext.option_context.add_option(toolcontext.opt_full, toolcontext.opt_output, toolcontext.opt_dir, toolcontext.opt_noact, toolcontext.opt_pattern, toolcontext.opt_file, 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." toolcontext.process_options(args) @@ -63,6 +63,12 @@ if toolcontext.opt_gen_unit.value then exit(0) end +"NIT_TESTING".setenv("true") + +var test_dir = toolcontext.test_dir +test_dir.mkdir +"# This file prevents the Nit modules of the directory to be part of the package".write_to_file(test_dir / "packages.ini") + var page = new HTMLTag("testsuites") if toolcontext.opt_full.value then mmodules = model.mmodules @@ -77,7 +83,7 @@ for a in args do end for a in module_files do - var g = modelbuilder.get_mgroup(a) + var g = modelbuilder.identify_group(a) if g == null then continue page.add modelbuilder.test_group(g) end