Skip to content

Commit

Permalink
docker: move make check into check_qemu helper
Browse files Browse the repository at this point in the history
Not all docker images can run the check step. Let's move everything
into a common helper so we don't need to replicate checks in the
future.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
  • Loading branch information
stsquad committed Jul 24, 2018
1 parent e4ce964 commit 3f9747a
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
11 changes: 11 additions & 0 deletions tests/docker/common.rc
Expand Up @@ -40,6 +40,17 @@ build_qemu()
make $MAKEFLAGS
}

check_qemu()
{
# default to make check unless the caller specifies
if test -z "$@"; then
INVOCATION="check"
else
INVOCATION="$@"
fi
make $MAKEFLAGS $INVOCATION
}

test_fail()
{
echo "$@"
Expand Down
2 changes: 1 addition & 1 deletion tests/docker/test-clang
Expand Up @@ -23,5 +23,5 @@ OPTS="--cxx=clang++ --cc=clang --host-cc=clang"
#OPTS="$OPTS --extra-cflags=-fsanitize=undefined \
#--extra-cflags=-fno-sanitize=float-divide-by-zero"
build_qemu $OPTS
make $MAKEFLAGS check
check_qemu
install_qemu
2 changes: 1 addition & 1 deletion tests/docker/test-debug
Expand Up @@ -22,5 +22,5 @@ OPTS="--cxx=clang++ --cc=clang --host-cc=clang"
OPTS="--enable-debug --enable-sanitizers $OPTS"

build_qemu $OPTS
make $MAKEFLAGS V=1 check
check_qemu check V=1
install_qemu
2 changes: 1 addition & 1 deletion tests/docker/test-full
Expand Up @@ -15,4 +15,4 @@

cd "$BUILD_DIR"

build_qemu && make check $MAKEFLAGS && install_qemu
build_qemu && check_qemu && install_qemu
2 changes: 1 addition & 1 deletion tests/docker/test-quick
Expand Up @@ -18,5 +18,5 @@ cd "$BUILD_DIR"
DEF_TARGET_LIST="x86_64-softmmu,aarch64-softmmu"
TARGET_LIST=${TARGET_LIST:-$DEF_TARGET_LIST} \
build_qemu
make check $MAKEFLAGS
check_qemu
install_qemu

0 comments on commit 3f9747a

Please sign in to comment.