Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,6 @@ jobs:
if: ${{ !cancelled() && steps.build.outcome == 'success' }}
run: make BUILD=${{ matrix.build }} check

- name: run unit-tests
# always run if build succeeds
if: ${{ !cancelled() && steps.build.outcome == 'success' && runner.os != 'macOS' }}
run: make BUILD=${{ matrix.build }} unittest

- name: run tests
# always run if build succeeds
if: ${{ !cancelled() && steps.build.outcome == 'success' }}
Expand Down
15 changes: 11 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,19 @@ NGINX_TESTS_DIR ?= $(NGINX_SOURCE_DIR)/tests
NGINX_BUILD_DIR ?= $(CURDIR)/objs-$(BUILD)

TEST_NGINX_BINARY = $(NGINX_BUILD_DIR)/nginx
TEST_NGINX_GLOBALS += env RUST_BACKTRACE;

# "build" always calls cargo and causes relinking.
# Clearing this var allows to skip the build step: "make test TEST_PREREQ="
TEST_PREREQ = build


.PHONY: all

all: ## Build, lint and test the module
all: build check test


# Conditionals via include, compatible with most implementations of make

# GNU make 3.81 or earlier
Expand All @@ -35,6 +43,7 @@ MAKE_FLAVOR!= echo posix
include build/compat-$(MAKE_FLAVOR).mk
include build/build-$(BUILD).mk


# Set up environment propagation

BUILD_ENV += NGINX_SOURCE_DIR="$(NGINX_SOURCE_DIR)"
Expand All @@ -44,12 +53,10 @@ TEST_ENV += RUST_BACKTRACE=1
TEST_ENV += TEST_NGINX_BINARY="$(TEST_NGINX_BINARY)"
TEST_ENV += TEST_NGINX_GLOBALS="$(TEST_NGINX_GLOBALS)"

# Build targets

.PHONY: all help build check test clean
# Build targets

all: ## Build, lint and test the module
all: build check unittest test
.PHONY: help build check unittest test clean

help:
@echo "Available targets:"
Expand Down
Loading