nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
nitunit: add --no-time to avoid time and improve reproductible results
[nit.git]
/
src
/
nitunit.nit
diff --git
a/src/nitunit.nit
b/src/nitunit.nit
index
996fe27
..
f58b916
100644
(file)
--- a/
src/nitunit.nit
+++ b/
src/nitunit.nit
@@
-59,6
+59,11
@@
if toolcontext.opt_gen_unit.value then
exit(0)
end
+# When testing `nitunit`, disable time.
+if "NIT_TESTING".environ != "" then
+ toolcontext.opt_no_time.value = true
+end
+
"NIT_TESTING".setenv("true")
"NIT_TESTING_ID".setenv(pid.to_s)
"SRAND".setenv("0")