From f2ba91899fdf2c41d3faac8439067195e423cd48 Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Mon, 16 Sep 2019 00:47:54 -0500 Subject: [PATCH] jpm test now starts a new interpreter per test. This should help with setup/teardown semantics, especially with native modules. --- auxbin/jpm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/auxbin/jpm b/auxbin/jpm index d2bb391c..4386549e 100755 --- a/auxbin/jpm +++ b/auxbin/jpm @@ -783,7 +783,9 @@ int main(int argc, const char **argv) { (case (os/stat ndir :mode) :file (when (string/has-suffix? ".janet" ndir) (print "running " ndir " ...") - (dofile ndir :exit true)) + (def result (os/execute [(dyn :executable "janet") ndir] :p)) + (when (not= 0 result) + (os/exit result))) :directory (dodir ndir)))) (dodir "test") (print "All tests passed.")))