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 143568f98cSFam Zhengrequires() 153568f98cSFam Zheng{ 163568f98cSFam Zheng for c in $@; do 173568f98cSFam Zheng if ! echo "$FEATURES" | grep -wq -e "$c"; then 183568f98cSFam Zheng echo "Prerequisite '$c' not present, skip" 193568f98cSFam Zheng exit 0 203568f98cSFam Zheng fi 213568f98cSFam Zheng done 223568f98cSFam Zheng} 233568f98cSFam Zheng 243568f98cSFam Zhengbuild_qemu() 253568f98cSFam Zheng{ 26*9445c28eSFam Zheng config_opts="--enable-werror \ 27*9445c28eSFam Zheng ${TARGET_LIST:+--target-list=${TARGET_LIST}} \ 28*9445c28eSFam Zheng --prefix=$PWD/install \ 2935e0f959SFam Zheng $EXTRA_CONFIGURE_OPTS \ 30*9445c28eSFam Zheng $@" 31*9445c28eSFam Zheng echo "Configure options:" 32*9445c28eSFam Zheng echo $config_opts 33*9445c28eSFam Zheng $QEMU_SRC/configure $config_opts 343568f98cSFam Zheng make $MAKEFLAGS 353568f98cSFam Zheng} 36