From 56e02f539033fcfc4dc1c40e3b7af40884b648ef Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Wed, 6 Aug 2025 21:55:33 -0700 Subject: [PATCH 1/2] Make: fix default target. One of the build configuration includes accidentally redefined the default target. Also, propagate RUST_BACKTRACE variable to the worker processes. --- Makefile | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 250c0d2..9536161 100644 --- a/Makefile +++ b/Makefile @@ -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 unittest test + + # Conditionals via include, compatible with most implementations of make # GNU make 3.81 or earlier @@ -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)" @@ -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:" From 190c9ea6ca875d976e18bcc20af436dd00b4064f Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Thu, 7 Aug 2025 10:56:35 -0700 Subject: [PATCH 2/2] Remove unittests from CI and "make all". With Rust 1.89, cargo test fails to link the test binaries due to missing symbols from NGINX. Disable unit-tests until we have a solution. --- .github/workflows/ci.yaml | 5 ----- Makefile | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e7750c0..779d777 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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' }} diff --git a/Makefile b/Makefile index 9536161..a7bb398 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ TEST_PREREQ = build .PHONY: all all: ## Build, lint and test the module -all: build check unittest test +all: build check test # Conditionals via include, compatible with most implementations of make