Skip to content

Commit 0e0d86f

Browse files
committed
Verify test script exists and print test runner command
1 parent 12d0a58 commit 0e0d86f

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

makefiles/duckdb_extension.Makefile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,14 @@ reldebug: ${EXTENSION_CONFIG_STEP}
186186
test: test_release
187187

188188
# Detect test runner. If missing, use the unittest binary directly.
189-
TEST_RUNNER ?= ${DUCKDB_SRCDIR}/scripts/ci/run_tests.py
190-
ifeq ($(shell which "$(TEST_RUNNER)" >/dev/null 2>&1 && echo yes),)
189+
TEST_RUNNER_SCRIPT ?= ${DUCKDB_SRCDIR}/scripts/ci/run_tests.py
190+
TEST_RUNNER := python3 $(TEST_RUNNER_SCRIPT)
191+
ifeq ($(shell test -e "$(TEST_RUNNER_SCRIPT)" && echo yes),)
191192
TEST_RUNNER :=
192193
endif
193194

195+
T ?= "$(TESTS_BASE_DIRECTORY)*"
196+
194197
# Disable testing outside docker: the unittester is currently dynamically linked by default
195198
ifeq ($(LINUX_CI_IN_DOCKER),0)
196199
SKIP_TESTS=1
@@ -200,7 +203,8 @@ define RUN_TEST
200203
@if [ "$(SKIP_TESTS)" = "1" ]; then \
201204
echo "Tests are skipped in this run..."; \
202205
else \
203-
$(TEST_RUNNER) ./build/$1/$(TEST_PATH) "$(TESTS_BASE_DIRECTORY)*"; \
206+
echo $(TEST_RUNNER) ./build/$1/$(TEST_PATH) $(T); \
207+
$(TEST_RUNNER) ./build/$1/$(TEST_PATH) $(T); \
204208
fi
205209
endef
206210

0 commit comments

Comments
 (0)