jw-pkg/test/integration/jw_pkg/projects/create-pkg-config/test.sh
Jan Lindemann 61c9479e79
test/integration/jw-pkg -> test/integration/jw_pkg
The mypy module names of the test tree derive from the full path, anchored
by the top-level test/__init__.py, but a file below a path component that
is not a valid identifier - the dashes in jw-pkg - falls back to the bare
file name, so two same-named test.py drivers collide (the duplicate module
error that drove the runme.py and main.py renames).

Rename the directory a sane Python name - jw_pkg, that's the better fix.
Then name the driver test.py like all the others for consistency.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-10-16 09:19:48 +02:00

28 lines
708 B
Shell

#!/bin/bash
# shellcheck disable=SC2048,SC2086
# Unquoted $* is intentional — the jw-pkg command line
export LC_ALL="C"
set -euo pipefail
jw_pkg_py="$*"
run()
{
local log_cmd
# shellcheck disable=SC2001
log_cmd=$(echo "$*" | sed 's|.*python3[0-9.]*\s\+\(\.\.\/\)*scripts/||')
printf '============= Running: %s\n' "$log_cmd"
"$@"
}
run $jw_pkg_py projects create-pkg-config \
-n jw-pkg -s 'jw-pkg test' -p /usr -v 1.0 \
--cflags=-I/usr/include --libflags=-L/usr/lib\ -ljw-pkg \
-r 'jw-core >= 1.0, jw-base' -R 'jw-devel'
run $jw_pkg_py projects create-pkg-config \
-n jw-pkg -p /usr -v 1.0 -r 'foo bar>=2.0, baz'
run $jw_pkg_py projects create-pkg-config \
-n jw-pkg -p /usr -v 1.0 -R 'qux'