7 [ -n "$CI_HELPER" ] || CI_HELPER
="/ci/.github/workflows/ci_helpers.sh"
9 for PKG
in /ci
/*.ipk
; do
10 tar -xzOf "$PKG" .
/control.
tar.gz |
tar xzf
- .
/control
11 # package name including variant
12 PKG_NAME
=$
(sed -ne 's#^Package: \(.*\)$#\1#p' .
/control
)
13 # package version without release
14 PKG_VERSION
=$
(sed -ne 's#^Version: \(.*\)-[0-9]*$#\1#p' .
/control
)
15 # package source contianing test.sh script
16 PKG_SOURCE
=$
(sed -ne 's#^Source: .*/\(.*\)$#\1#p' .
/control
)
18 echo "Testing package $PKG_NAME in version $PKG_VERSION from $PKG_SOURCE"
22 export PKG_NAME PKG_VERSION CI_HELPER
24 TEST_SCRIPT
=$
(find /ci
/ -name "$PKG_SOURCE" -type d
)/test.sh
26 if [ -f "$TEST_SCRIPT" ]; then
27 echo "Use package specific test.sh"
28 if sh
"$TEST_SCRIPT" "$PKG_NAME" "$PKG_VERSION"; then
29 echo "Test successful"
35 echo "No test.sh script available"
38 opkg remove
"$PKG_NAME" --force-removal-of-dependent-packages --force-remove