diff --git a/Makefile b/Makefile index 46de0cebd16c84eeb272a5db805b726f774a8232..a494e8eb6a68be493ed9b3ae188b1d8f56b63ea6 100644 --- a/Makefile +++ b/Makefile @@ -497,17 +497,19 @@ CLEAN_FILES += t LOG $(TMPD) watch-log: watch --interval=0 'sort -k7,7nr -k4,4gr LOG|$(quoted_perl_command)' -# If GNU parallel is installed, run the tests in parallel, +# If J != 1 and GNU parallel is installed, run the tests in parallel, # via the check_0 rule above. Otherwise, run them sequentially. check: all - $(AM_V_GEN)case $$(parallel --gnu --help 2>/dev/null) in \ - *'GNU Parallel'*) \ - t=$$($(test_names)); \ - $(MAKE) T="$$t" TMPD=$(TMPD) check_0;; \ - *) \ - for t in $(TESTS); do \ - echo "===== Running $$t"; ./$$t || exit 1; done;; \ - esac + $(AM_V_GEN)if test "$(J)" != 1 \ + && (parallel --gnu --help 2>/dev/null) | \ + grep -q 'GNU Parallel'; \ + then \ + t=$$($(test_names)); \ + $(MAKE) T="$$t" TMPD=$(TMPD) check_0; \ + else \ + for t in $(TESTS); do \ + echo "===== Running $$t"; ./$$t || exit 1; done; \ + fi rm -rf $(TMPD) check_some: $(SUBSET) ldb_tests