[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 05/13] docker: Add common.rc
From: |
Fam Zheng |
Subject: |
[Qemu-devel] [PATCH v4 05/13] docker: Add common.rc |
Date: |
Thu, 17 Mar 2016 14:34:57 +0800 |
"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: Alex Bennée <address@hidden>
Signed-off-by: Fam Zheng <address@hidden>
---
tests/docker/common.rc | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
create mode 100755 tests/docker/common.rc
diff --git a/tests/docker/common.rc b/tests/docker/common.rc
new file mode 100755
index 0000000..74b89d6
--- /dev/null
+++ b/tests/docker/common.rc
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# Common routines for docker test scripts.
+#
+# Copyright (c) 2016 Red Hat Inc.
+#
+# Authors:
+# Fam Zheng <address@hidden>
+#
+# 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
+}
--
2.4.3
- [Qemu-devel] [PATCH v4 00/13] tests: Introducing docker tests, Fam Zheng, 2016/03/17
- [Qemu-devel] [PATCH v4 01/13] tests: Add utilities for docker testing, Fam Zheng, 2016/03/17
- [Qemu-devel] [PATCH v4 02/13] Makefile: Rules for docker testing, Fam Zheng, 2016/03/17
- [Qemu-devel] [PATCH v4 04/13] docker: Add test runner, Fam Zheng, 2016/03/17
- [Qemu-devel] [PATCH v4 03/13] docker: Add images, Fam Zheng, 2016/03/17
- [Qemu-devel] [PATCH v4 05/13] docker: Add common.rc,
Fam Zheng <=
- [Qemu-devel] [PATCH v4 06/13] docker: Add quick test, Fam Zheng, 2016/03/17
- [Qemu-devel] [PATCH v4 07/13] docker: Add full test, Fam Zheng, 2016/03/17
- [Qemu-devel] [PATCH v4 08/13] docker: Add clang test, Fam Zheng, 2016/03/17
- [Qemu-devel] [PATCH v4 09/13] docker: Add mingw test, Fam Zheng, 2016/03/17
- [Qemu-devel] [PATCH v4 10/13] docker: Add travis tool, Fam Zheng, 2016/03/17
- [Qemu-devel] [PATCH v4 11/13] docs: Add text for tests/docker in build-system.txt, Fam Zheng, 2016/03/17
- [Qemu-devel] [PATCH v4 12/13] docker: Add EXTRA_CONFIGURE_OPTS, Fam Zheng, 2016/03/17