From 18ccdf0a1883be61f2c496acf487a874d80c5374 Mon Sep 17 00:00:00 2001 From: Alexandre Terrasa Date: Mon, 28 Nov 2016 16:11:16 -0500 Subject: [PATCH] nitunit: set NIT_TESTING_PATH before running a test suite Signed-off-by: Alexandre Terrasa --- src/testing/testing_suite.nit | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/testing/testing_suite.nit b/src/testing/testing_suite.nit index 5112d2f..e788067 100644 --- a/src/testing/testing_suite.nit +++ b/src/testing/testing_suite.nit @@ -129,6 +129,7 @@ class TestSuite # Execute the test suite fun run do + set_env show_status if not toolcontext.test_dir.file_exists then toolcontext.test_dir.mkdir @@ -214,6 +215,13 @@ class TestSuite end end + # Set environment variables for test suite execution + fun set_env do + var loc = mmodule.location.file + if loc == null then return + toolcontext.set_testing_path(loc.filename) + end + # Error occured during test-suite compilation. var failure: nullable String = null end -- 1.7.9.5