Skip to content

Commit f38a41a

Browse files
committed
Make: add "full-test" target to run NGINX test suite.
We need this to ensure that 900031a does not happen again. To maintain a reasonable test execution time, the target runs parallel jobs on all available CPUs.
1 parent 28ae1b3 commit f38a41a

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,11 @@ unittest: $(NGINX_BUILD_DIR)/Makefile ## Run unit-tests
9999
$(BUILD_ENV) $(NGX_CARGO) test
100100

101101
test: $(TEST_PREREQ) ## Run the integration test suite
102-
env $(TEST_ENV) prove -I $(NGINX_TESTS_DIR)/lib --state=save $(TESTS) ||\
102+
env $(TEST_ENV) prove -I $(NGINX_TESTS_DIR)/lib -v $(TESTS)
103+
104+
full-test: $(TEST_PREREQ) ## Run the module and NGINX integration test suites
105+
env $(TEST_ENV) prove -I $(NGINX_TESTS_DIR)/lib --state=save \
106+
-j $(TEST_JOBS) $(TESTS) $(NGINX_TESTS_DIR) ||\
103107
env $(TEST_ENV) prove -I $(NGINX_TESTS_DIR)/lib --state=failed -v
104108

105109
clean: ## Cleanup everything

build/compat-gnu.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
HOST_TUPLE := $(shell $(NGX_CARGO) -vV | awk '/^host: / { print $$2; }')
2+
TEST_JOBS := $(shell nproc 2>/dev/null || getconf NPROCESSORS_ONLN 2>/dev/null || echo 1)
23

34
# extension for Rust cdylib targets
45
ifeq ($(shell uname), Darwin)

build/compat-posix.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
HOST_TUPLE != $(NGX_CARGO) -vV | awk '/^host: / { print $$2; }'
2+
TEST_JOBS != nproc 2>/dev/null || getconf NPROCESSORS_ONLN 2>/dev/null || echo 1
23

34
# bsd make compatibility
45
CURDIR ?= $(.CURDIR)

0 commit comments

Comments
 (0)