Use dynamic distro selection for UNIT and INTEGRATION tests
- Pass `distro=arch` from Makefile into test scripts
- Replace hardcoded "arch" references with "${distro}"
- Update test-unit.sh and test-integration.sh to use dynamic image names
- Improve log output to reflect selected distro
https://chatgpt.com/share/6939c98a-d428-800f-8bb8-cf72e80ba80c
This commit is contained in:
4
Makefile
4
Makefile
@@ -45,10 +45,10 @@ build:
|
|||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
|
|
||||||
test-unit: build-missing
|
test-unit: build-missing
|
||||||
@bash scripts/test/test-unit.sh
|
@distro=arch scripts/test/test-unit.sh
|
||||||
|
|
||||||
test-integration: build-missing
|
test-integration: build-missing
|
||||||
@bash scripts/test/test-integration.sh
|
@distro=arch scripts/test/test-integration.sh
|
||||||
|
|
||||||
test-e2e: build-missing
|
test-e2e: build-missing
|
||||||
@bash scripts/test/test-e2e.sh
|
@bash scripts/test/test-e2e.sh
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
echo "============================================================"
|
echo "============================================================"
|
||||||
echo ">>> Running INTEGRATION tests in Arch container"
|
echo ">>> Running INTEGRATION tests in ${distro} container"
|
||||||
echo "============================================================"
|
echo "============================================================"
|
||||||
|
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
@@ -13,7 +13,7 @@ docker run --rm \
|
|||||||
-e PKGMGR_DEV=1 \
|
-e PKGMGR_DEV=1 \
|
||||||
-e TEST_PATTERN="${TEST_PATTERN}" \
|
-e TEST_PATTERN="${TEST_PATTERN}" \
|
||||||
--entrypoint bash \
|
--entrypoint bash \
|
||||||
"package-manager-test-arch" \
|
"package-manager-test-${distro}" \
|
||||||
-c '
|
-c '
|
||||||
set -e;
|
set -e;
|
||||||
git config --global --add safe.directory /src || true;
|
git config --global --add safe.directory /src || true;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
echo "============================================================"
|
echo "============================================================"
|
||||||
echo ">>> Running UNIT tests in Arch container"
|
echo ">>> Running UNIT tests in ${distro} container"
|
||||||
echo "============================================================"
|
echo "============================================================"
|
||||||
|
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
@@ -13,7 +13,7 @@ docker run --rm \
|
|||||||
-e PKGMGR_DEV=1 \
|
-e PKGMGR_DEV=1 \
|
||||||
-e TEST_PATTERN="${TEST_PATTERN}" \
|
-e TEST_PATTERN="${TEST_PATTERN}" \
|
||||||
--entrypoint bash \
|
--entrypoint bash \
|
||||||
"package-manager-test-arch" \
|
"package-manager-test-${distro}" \
|
||||||
-c '
|
-c '
|
||||||
set -e;
|
set -e;
|
||||||
git config --global --add safe.directory /src || true;
|
git config --global --add safe.directory /src || true;
|
||||||
|
|||||||
Reference in New Issue
Block a user