2016-06-01 06:25:20 +02:00
|
|
|
#!/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.
|
|
|
|
|
2016-09-28 09:31:32 +02:00
|
|
|
BUILD_DIR=/var/tmp/qemu-build
|
|
|
|
mkdir $BUILD_DIR
|
|
|
|
|
2016-06-01 06:25:20 +02:00
|
|
|
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()
|
|
|
|
{
|
2016-09-21 05:49:25 +02:00
|
|
|
config_opts="--enable-werror \
|
|
|
|
${TARGET_LIST:+--target-list=${TARGET_LIST}} \
|
|
|
|
--prefix=$PWD/install \
|
2017-02-20 11:51:37 +01:00
|
|
|
$QEMU_CONFIGURE_OPTS $EXTRA_CONFIGURE_OPTS \
|
2016-09-21 05:49:25 +02:00
|
|
|
$@"
|
|
|
|
echo "Configure options:"
|
|
|
|
echo $config_opts
|
|
|
|
$QEMU_SRC/configure $config_opts
|
2016-06-01 06:25:20 +02:00
|
|
|
make $MAKEFLAGS
|
|
|
|
}
|