loader: use NIT_TESTING_TESTSSH to ignore picnit packages when testing
authorAlexis Laferrière <alexis.laf@xymus.net>
Thu, 1 Mar 2018 15:00:38 +0000 (10:00 -0500)
committerAlexis Laferrière <alexis.laf@xymus.net>
Thu, 1 Mar 2018 15:25:01 +0000 (10:25 -0500)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

src/loader.nit

index 9563713..f18d7be 100644 (file)
@@ -66,8 +66,10 @@ redef class ModelBuilder
                # Setup the paths value
                paths.append(toolcontext.opt_path.value)
 
-               # Packages managed by picnit
-               paths.add picnit_lib_dir
+               # Packages managed by picnit, only use when not testing with tests.sh
+               if "NIT_TESTING_TESTS_SH".environ != "true" then
+                       paths.add picnit_lib_dir
+               end
 
                var path_env = "NIT_PATH".environ
                if not path_env.is_empty then