13568f98cSFam Zheng#!/bin/sh 23568f98cSFam Zheng# 33568f98cSFam Zheng# Common routines for docker test scripts. 43568f98cSFam Zheng# 53568f98cSFam Zheng# Copyright (c) 2016 Red Hat Inc. 63568f98cSFam Zheng# 73568f98cSFam Zheng# Authors: 83568f98cSFam Zheng# Fam Zheng <famz@redhat.com> 93568f98cSFam Zheng# 103568f98cSFam Zheng# This work is licensed under the terms of the GNU GPL, version 2 113568f98cSFam Zheng# or (at your option) any later version. See the COPYING file in 123568f98cSFam Zheng# the top-level directory. 133568f98cSFam Zheng 14c16fe84fSFam ZhengBUILD_DIR=/var/tmp/qemu-build 15c16fe84fSFam Zhengmkdir $BUILD_DIR 16c16fe84fSFam Zheng 173568f98cSFam Zhengrequires() 183568f98cSFam Zheng{ 193568f98cSFam Zheng for c in $@; do 203568f98cSFam Zheng if ! echo "$FEATURES" | grep -wq -e "$c"; then 213568f98cSFam Zheng echo "Prerequisite '$c' not present, skip" 223568f98cSFam Zheng exit 0 233568f98cSFam Zheng fi 243568f98cSFam Zheng done 253568f98cSFam Zheng} 263568f98cSFam Zheng 273568f98cSFam Zhengbuild_qemu() 283568f98cSFam Zheng{ 299445c28eSFam Zheng config_opts="--enable-werror \ 309445c28eSFam Zheng ${TARGET_LIST:+--target-list=${TARGET_LIST}} \ 319445c28eSFam Zheng --prefix=$PWD/install \ 32*24e0131fSAlex Bennée $QEMU_CONFIGURE_OPTS $EXTRA_CONFIGURE_OPTS \ 339445c28eSFam Zheng $@" 349445c28eSFam Zheng echo "Configure options:" 359445c28eSFam Zheng echo $config_opts 369445c28eSFam Zheng $QEMU_SRC/configure $config_opts 373568f98cSFam Zheng make $MAKEFLAGS 383568f98cSFam Zheng} 39