Merge remote-tracking branch 'remotes/kraxel/tags/pull-ui-20161013-1' into staging
[qemu/ar7.git] / tests / docker / common.rc
blob21657e87c646f812379fbfa6884dfb8aa149c6c9
1 #!/bin/sh
3 # Common routines for docker test scripts.
5 # Copyright (c) 2016 Red Hat Inc.
7 # Authors:
8 # Fam Zheng <famz@redhat.com>
10 # This work is licensed under the terms of the GNU GPL, version 2
11 # or (at your option) any later version. See the COPYING file in
12 # the top-level directory.
14 BUILD_DIR=/var/tmp/qemu-build
15 mkdir $BUILD_DIR
17 requires()
19 for c in $@; do
20 if ! echo "$FEATURES" | grep -wq -e "$c"; then
21 echo "Prerequisite '$c' not present, skip"
22 exit 0
24 done
27 build_qemu()
29 config_opts="--enable-werror \
30 ${TARGET_LIST:+--target-list=${TARGET_LIST}} \
31 --prefix=$PWD/install \
32 $EXTRA_CONFIGURE_OPTS \
33 $@"
34 echo "Configure options:"
35 echo $config_opts
36 $QEMU_SRC/configure $config_opts
37 make $MAKEFLAGS