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>
This commit is contained in:
Paul Liljenberg 2016-01-26 16:28:18 +01:00
parent 60821c6dfd
commit 620b8250e8
1 changed files with 13 additions and 2 deletions

View File

@ -12,7 +12,14 @@ fi
test_deb_install(){
# test for each Dockerfile in contrib/builder
for dir in contrib/builder/deb/${PACKAGE_ARCH}/*/; do
builderDir="contrib/builder/deb/${PACKAGE_ARCH}"
pkgs=( $(find "${builderDir}/"*/ -type d) )
if [ ! -z "$DOCKER_BUILD_PKGS" ]; then
pkgs=( $(echo ${DOCKER_BUILD_PKGS[@]/#/$builderDir\/}) )
fi
for dir in "${pkgs[@]}"; do
[ -d "$dir" ] || { echo >&2 "skipping nonexistent $dir"; continue; }
local from="$(awk 'toupper($1) == "FROM" { print $2; exit }' "$dir/Dockerfile")"
local dir=$(basename "$dir")
@ -54,4 +61,8 @@ test_deb_install(){
done
}
test_deb_install
(
bundle .integration-daemon-start
test_deb_install
bundle .integration-daemon-stop
) 2>&1 | tee -a "$DEST/test.log"