Skip to content

Commit 50c9d95

Browse files
committed
tooling: Allow conanfiles used by smoketest to be overridden
This can be done via the TEST_CONANFILES make variable: make smoketest-deps smoketest TEST_CONANFILES=test/conanfile_onlyone.py
1 parent 9c533c9 commit 50c9d95

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Makefile.package

+8-2
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,11 @@ PACKAGE_VERSION := $(or \
105105
PACKAGE_CHANNEL := cloe/develop
106106
PACKAGE_FQN := ${PACKAGE_NAME}/${PACKAGE_VERSION}@${PACKAGE_CHANNEL}
107107

108+
# Which files to consider as smoketest profiles when running targets
109+
# `smoketest-deps` and `smoketest`. This can be useful to override from the
110+
# command line if you just want to test one configuration.
111+
TEST_CONANFILES := tests/conanfile_*.py
112+
108113
# It is an order of magnitude faster to parse ~/.conan/editable_packages.json
109114
# ourselves than to get conan to do it for us. This should only take us 20ms,
110115
# while conan needs 250ms. Also, this will tell us if the package is editable,
@@ -302,15 +307,16 @@ info: parse-info
302307
.PHONY: smoketest
303308
smoketest:
304309
# Ensure that you have built all smoketest dependencies!
305-
@for conanfile in tests/conanfile_*.py; do \
310+
@for conanfile in ${TEST_CONANFILES}; do \
306311
test -f "$${conanfile}" || continue; \
307312
printf "Running BATS tests with conanfile: $${conanfile}\n\n"; \
308313
SHELL=/bin/bash ${CLOE_LAUNCH} shell -P "$${conanfile}" -- -c "source ${PROJECT_ROOT}/tests/setup_testname.bash; bats tests"; \
309314
done
310315

316+
.PHONY: smoketest-deps
311317
smoketest-deps:
312318
# Ensure that you have exported all relevant packages!
313-
@for conanfile in tests/conanfile_*.py; do \
319+
@for conanfile in ${TEST_CONANFILES}; do \
314320
test -f "$${conanfile}" || continue; \
315321
echo "Building dependencies for conanfile: $${conanfile}"; \
316322
${CLOE_LAUNCH} prepare -P "$${conanfile}" || break; \

0 commit comments

Comments
 (0)