summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Newson <rnewson@apache.org>2019-02-01 10:31:31 +0000
committerRobert Newson <rnewson@apache.org>2019-02-01 13:55:05 +0000
commit20bbfbf972ad1f822e2ef1edfb3d47f2cec3f639 (patch)
treebe49b5b2c2d80ec97fa89d49dec599e66c80b2b6
parent9a573358ff7ffb0f03a68267680e63409fa42265 (diff)
downloadcouchdb-20bbfbf972ad1f822e2ef1edfb3d47f2cec3f639.tar.gz
Run each apps test in a separate process
This reduces non-causal test failures between apps.
-rw-r--r--Makefile13
1 files changed, 10 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index ee44ea7f3..39476996c 100644
--- a/Makefile
+++ b/Makefile
@@ -76,7 +76,6 @@ COMPILE_OPTS=$(shell echo "\
apps=$(apps) \
" | sed -e 's/[a-z_]\{1,\}= / /g')
EUNIT_OPTS=$(shell echo "\
- apps=$(apps) \
skip_deps=$(skip_deps) \
suites=$(suites) \
tests=$(tests) \
@@ -154,13 +153,21 @@ check: all
.PHONY: eunit
# target: eunit - Run EUnit tests, use EUNIT_OPTS to provide custom options
+
+ifdef apps
+subdirs = $(apps)
+else
+subdirs=$(shell ls src)
+endif
+
eunit: export BUILDDIR = $(shell pwd)
eunit: export ERL_AFLAGS = -config $(shell pwd)/rel/files/eunit.config
eunit: export COUCHDB_QUERY_SERVER_JAVASCRIPT = $(shell pwd)/bin/couchjs $(shell pwd)/share/server/main.js
eunit: couch
@$(REBAR) setup_eunit 2> /dev/null
- @$(REBAR) -r eunit $(EUNIT_OPTS)
-
+ @for dir in $(subdirs); do \
+ $(REBAR) -r eunit $(EUNIT_OPTS) apps=$$dir; \
+ done
setup-eunit: export BUILDDIR = $(shell pwd)
setup-eunit: export ERL_AFLAGS = -config $(shell pwd)/rel/files/eunit.config