nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
26711bc
)
nitunit: set NIT_TESTING_PATH before running a test suite
author
Alexandre Terrasa
<alexandre@moz-code.org>
Mon, 28 Nov 2016 21:11:16 +0000
(16:11 -0500)
committer
Alexandre Terrasa
<alexandre@moz-code.org>
Mon, 28 Nov 2016 21:11:16 +0000
(16:11 -0500)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
src/testing/testing_suite.nit
patch
|
blob
|
history
diff --git
a/src/testing/testing_suite.nit
b/src/testing/testing_suite.nit
index
5112d2f
..
e788067
100644
(file)
--- 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