Currently we configure and build under "$QEMU_SRC/tests/docker" which is dubious. Create a fixed directory (to be friendly to ccache) and change to there before calling build_qemu. Signed-off-by: Fam Zheng <famz@redhat.com> Message-Id: <1475047892-11955-1-git-send-email-famz@redhat.com>
39 lines
857 B
Bash
Executable file
39 lines
857 B
Bash
Executable file
#!/bin/sh
|
|
#
|
|
# Common routines for docker test scripts.
|
|
#
|
|
# Copyright (c) 2016 Red Hat Inc.
|
|
#
|
|
# Authors:
|
|
# Fam Zheng <famz@redhat.com>
|
|
#
|
|
# This work is licensed under the terms of the GNU GPL, version 2
|
|
# or (at your option) any later version. See the COPYING file in
|
|
# the top-level directory.
|
|
|
|
BUILD_DIR=/var/tmp/qemu-build
|
|
mkdir $BUILD_DIR
|
|
|
|
requires()
|
|
{
|
|
for c in $@; do
|
|
if ! echo "$FEATURES" | grep -wq -e "$c"; then
|
|
echo "Prerequisite '$c' not present, skip"
|
|
exit 0
|
|
fi
|
|
done
|
|
}
|
|
|
|
build_qemu()
|
|
{
|
|
config_opts="--enable-werror \
|
|
${TARGET_LIST:+--target-list=${TARGET_LIST}} \
|
|
--prefix=$PWD/install \
|
|
$EXTRA_CONFIGURE_OPTS \
|
|
$@"
|
|
echo "Configure options:"
|
|
echo $config_opts
|
|
$QEMU_SRC/configure $config_opts
|
|
make $MAKEFLAGS
|
|
}
|