nitdoc: increase the verbosity level for the numerous skip messages
[nit.git] / src / testing / testing_suite.nit
index 25b1fc8..0f1b117 100644 (file)
@@ -214,8 +214,8 @@ class TestCase
        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
@@ -244,7 +244,7 @@ class TestCase
                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
@@ -383,13 +383,13 @@ redef class ModelBuilder
                        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