Skip to content

Commit 620b825

Browse files
author
Paul Liljenberg
committed
improve test-deb-install
This PR adds support for using the DOCKER_BUILD_PKGS env var to better help defining what packege to build. It also adds support for the integration-daemon so we can run it as a bundle. Signed-off-by: Paul Liljenberg <liljenberg.paul@gmail.com> add directory test Adds missing directory test. This helps verifying that DOCKER_BUILD_PKGS is a directory and exists before continueing. Signed-off-by: Paul Liljenberg <liljenberg.paul@gmail.com> fix indent Signed-off-by: Paul Liljenberg <liljenberg.paul@gmail.com>
1 parent 60821c6 commit 620b825

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

hack/make/test-deb-install

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,14 @@ fi
1212

1313
test_deb_install(){
1414
# test for each Dockerfile in contrib/builder
15-
for dir in contrib/builder/deb/${PACKAGE_ARCH}/*/; do
15+
16+
builderDir="contrib/builder/deb/${PACKAGE_ARCH}"
17+
pkgs=( $(find "${builderDir}/"*/ -type d) )
18+
if [ ! -z "$DOCKER_BUILD_PKGS" ]; then
19+
pkgs=( $(echo ${DOCKER_BUILD_PKGS[@]/#/$builderDir\/}) )
20+
fi
21+
for dir in "${pkgs[@]}"; do
22+
[ -d "$dir" ] || { echo >&2 "skipping nonexistent $dir"; continue; }
1623
local from="$(awk 'toupper($1) == "FROM" { print $2; exit }' "$dir/Dockerfile")"
1724
local dir=$(basename "$dir")
1825

@@ -54,4 +61,8 @@ test_deb_install(){
5461
done
5562
}
5663

57-
test_deb_install
64+
(
65+
bundle .integration-daemon-start
66+
test_deb_install
67+
bundle .integration-daemon-stop
68+
) 2>&1 | tee -a "$DEST/test.log"

0 commit comments

Comments
 (0)