summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerard Ryan <G.M0N3Y.2503@gmail.com>2023-04-29 16:25:49 +1000
committerJosef Schlehofer <pepe.schlehofer@gmail.com>2023-09-01 21:56:39 +0200
commitca620495d34474765b4727576eb7164efc893e78 (patch)
treeb6516d657c9ea891b17e5be008669540cdf644d7
parent9f7ba4a4b5028e5f7ab1d8abb9393e307b9ecc36 (diff)
cache-domains: added pre-test.sh CI step
Some packages variants have conflicting dependencies with the base packages and the CI test will fail to install before anything can be done by the packages to setup the system for install. This change adds a pre-test.sh that runs before the install so things like the default libustream variant can be swapped out as shown in the updated cache-domains. Signed-off-by: Gerard Ryan <G.M0N3Y.2503@gmail.com> (cherry picked from commit 61997c86b01c83320a2cbb1b490941a8af741253)
-rwxr-xr-x.github/workflows/entrypoint.sh18
1 files changed, 16 insertions, 2 deletions
diff --git a/.github/workflows/entrypoint.sh b/.github/workflows/entrypoint.sh
index 6332011..a0fdae3 100755
--- a/.github/workflows/entrypoint.sh
+++ b/.github/workflows/entrypoint.sh
@@ -26,10 +26,24 @@ for PKG in /ci/*.ipk; do
echo "Testing package $PKG_NAME in version $PKG_VERSION from $PKG_SOURCE"
- opkg install "$PKG"
-
export PKG_NAME PKG_VERSION CI_HELPER
+ PRE_TEST_SCRIPT=$(find /ci/ -name "$PKG_SOURCE" -type d)/pre-test.sh
+
+ if [ -f "$PRE_TEST_SCRIPT" ]; then
+ echo "Use package specific pre-test.sh"
+ if sh "$PRE_TEST_SCRIPT" "$PKG_NAME" "$PKG_VERSION"; then
+ echo "Pre-test successful"
+ else
+ echo "Pre-test failed"
+ exit 1
+ fi
+ else
+ echo "No pre-test.sh script available"
+ fi
+
+ opkg install "$PKG"
+
TEST_SCRIPT=$(find /ci/ -name "$PKG_SOURCE" -type d)/test.sh
if [ -f "$TEST_SCRIPT" ]; then