|
18 | 18 | PROJECT_ROOT := $(dir $(abspath $(lastword ${MAKEFILE_LIST})))
|
19 | 19 | PROJECT_VERSION := $(shell [ -r ${PROJECT_ROOT}/VERSION ] && cat ${PROJECT_ROOT}/VERSION || echo unknown)
|
20 | 20 |
|
| 21 | +CLOE_ROOT := ${PROJECT_ROOT} |
| 22 | +CLOE_LAUNCH := PYTHONPATH="${CLOE_ROOT}/cli" python3 -m cloe_launch |
| 23 | + |
| 24 | +SHELL := /bin/bash |
21 | 25 | DATE := $(shell date +"%Y%m%d")
|
22 | 26 | TIMESTAMP := $(shell date -u +'%Y-%m-%dT%H:%M:%SZ')
|
23 | 27 |
|
@@ -115,18 +119,20 @@ endif
|
115 | 119 |
|
116 | 120 | # INFORMATIONAL TARGETS -------------------------------------------------------
|
117 | 121 | .DEFAULT: help
|
118 |
| -.SILENT: help status parse-info parse-editable info-name info-version info-channel info-fqn info |
119 |
| -.PHONY: help status parse-info parse-editable info-name info-version info-channel info-fqn info |
| 122 | +.SILENT: help status parse-info parse-editable info-name info-version info-channel info-fqn info smoketest smoketest-deps |
| 123 | +.PHONY: help status parse-info parse-editable info-name info-version info-channel info-fqn info smoketest smoketest-deps |
120 | 124 | help:: parse-info parse-editable
|
121 | 125 | echo "Usage: make <target>"
|
122 | 126 | echo
|
123 | 127 | echo "The following targets define common operations with this package in"
|
124 | 128 | echo "editable (local in-source) and uneditable (in the Conan cache) modes."
|
125 | 129 | echo
|
126 | 130 | echo "Available targets:"
|
127 |
| - echo " help to show this help" |
128 |
| - echo " status to show status of package" |
129 |
| - echo " info to show detailed package info" |
| 131 | + echo " help to show this help" |
| 132 | + echo " status to show status of package" |
| 133 | + echo " info to show detailed package info" |
| 134 | + echo " smoketest-deps to build smoketest dependencies for package" |
| 135 | + echo " smoketest to run smoketests for package (requires built packages)" |
130 | 136 | echo
|
131 | 137 | echo " export to export recipe and sources [conan-cache]"
|
132 | 138 | echo " download to download or create package [conan-cache]"
|
@@ -218,6 +224,20 @@ info: parse-info
|
218 | 224 | echo ${PACKAGE_INFO}; \
|
219 | 225 | fi
|
220 | 226 |
|
| 227 | +smoketest: |
| 228 | + @for profile in tests/profile_*.py; do \ |
| 229 | + test -f "$${profile}" || continue; \ |
| 230 | + printf "Running BATS tests with profile: $${profile}\n\n"; \ |
| 231 | + SHELL=/bin/bash ${CLOE_LAUNCH} shell -P "$${profile}" -- -c "source ${CLOE_ROOT}/tests/setup_testname.bash; bats tests"; \ |
| 232 | + done |
| 233 | + |
| 234 | +smoketest-deps: |
| 235 | + @for profile in tests/profile_*.py; do \ |
| 236 | + test -f "$${profile}" || continue; \ |
| 237 | + echo "Building dependencies for profile: $${profile}"; \ |
| 238 | + ${CLOE_LAUNCH} prepare -P "$${profile}"; \ |
| 239 | + done |
| 240 | + |
221 | 241 | # CONFIGURATION TARGETS -------------------------------------------------------
|
222 | 242 | .PHONY: editable uneditable
|
223 | 243 |
|
|
0 commit comments