test/integration/jw-pkg/projects/cache: Add directory

Add tests for jw-pkg.py calls run during makefile caching. Broken
caching can compromise the build without causing it to fail entirely,
i.e. in non-obvious ways.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-07-23 18:10:53 +02:00
commit 100d8f9abb
Signed by: Jan Lindemann
GPG key ID: 3750640C9E25DD61

View file

@ -0,0 +1,29 @@
# This file runs commands typically used during initial Makefile caching.
#
# It's especially useful to run them in an explicit test, because they are used
# to fill Makefile variables, and if they fail, they leave an empty variable
# behind instead of failing the build entirely.
export JW_DEFAULT_SHOW_BACKTRACE = true
TOPDIR = ../../../../..
include $(TOPDIR)/make/proj.mk
include $(TOPDIR)/make/test-jw-pkg.mk
all:
test: test.integration.in-tree
test.integration.in-tree:
$(TEST_CMD_LINE) --topdir-format absolute platform info --format "%{gnu-triplet} %{cascade}"
$(TEST_CMD_LINE) --topdir-format absolute platform info --format %{id}-%{codename}
$(TEST_CMD_LINE) --topdir-format absolute projects pkg-requires --no-subpackages --subsections=jw --syntax names-only --delimiter " " "build devel" jw-pkg
$(TEST_CMD_LINE) --topdir-format absolute projects pkg-requires --no-subpackages --subsections=jw --syntax names-only --delimiter " " run jw-pkg
$(TEST_CMD_LINE) --topdir-format absolute projects proj-dir jw-pkg
$(TEST_CMD_LINE) --topdir-format absolute projects pythonpath --delimiter " " jw-pkg
$(TEST_CMD_LINE) --topdir-format relative projects pythonpath --prefix '$$MYPY_CONFIG_FILE_DIR/' jw-pkg
$(TEST_CMD_LINE) --topdir-format unaltered projects create-file --format tmpl --template-name pyproject.toml --search-path $(TOPDIR)/conf/templates --field "mypypath=mypy_path = "$MYPY_CONFIG_FILE_DIR/src/python"" jw-pkg > test-pyproject.toml
$(TEST_CMD_LINE) --topdir-format unaltered projects create-file --format pyright --field base=./conf/project/pyrightconfig-base.json --field include=src/python jw-pkg > test-pyrightconfig.json
clean: test.integration.in-tree.clean
test.integration.in-tree.clean:
rm -f test-*.*