From: Alexandre Terrasa Date: Mon, 28 Nov 2016 21:11:16 +0000 (-0500) Subject: nitunit: set NIT_TESTING_PATH before running a test suite X-Git-Url: http://nitlanguage.org nitunit: set NIT_TESTING_PATH before running a test suite Signed-off-by: Alexandre Terrasa --- 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