Skip to content

Instantly share code, notes, and snippets.

@rrooij
Created January 8, 2021 09:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rrooij/203ce1d18aac7df68cd416eb1b544673 to your computer and use it in GitHub Desktop.
Save rrooij/203ce1d18aac7df68cd416eb1b544673 to your computer and use it in GitHub Desktop.
Concurrent testing PLUnit SWI Prolog
diff --git a/plunit.pl b/plunit.pl
index 06776b8..155d935 100644
--- a/plunit.pl
+++ b/plunit.pl
@@ -611,7 +611,7 @@ run_unit(Spec) :-
-> info(plunit(blocked(unit(Unit, Reason))))
; setup(Module, unit(Unit), UnitOptions)
-> info(plunit(begin(Spec))),
- forall((Module:'unit test'(Name, Line, Options, Body),
+ concurrent_forall((Module:'unit test'(Name, Line, Options, Body),
matching_test(Name, Tests)),
run_test(Unit, Name, Line, Options, Body)),
info(plunit(end(Spec))),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment