提交 3568f98c 编写于 作者: F Fam Zheng

docker: Add common.rc

"requires" checks the "FEATURE" environment for specified prerequisits,
and skip the execution of test if not found.

"build_qemu" is the central routine to compile QEMU for tests to call.
Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
Signed-off-by: NFam Zheng <famz@redhat.com>
Message-id: 1464755128-32490-8-git-send-email-famz@redhat.com
上级 b344aa91
#!/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.
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()
{
$QEMU_SRC/configure \
--target-list="${TARGET_LIST}" \
--prefix="$PWD/install" \
"$@"
make $MAKEFLAGS
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册