qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 05/12] docker: Add common.rc


From: Fam Zheng
Subject: [Qemu-devel] [PATCH 05/12] docker: Add common.rc
Date: Fri, 5 Feb 2016 17:24:16 +0800

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

Signed-off-by: Fam Zheng <address@hidden>
---
 tests/docker/common.rc | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 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..5ad8ddc
--- /dev/null
+++ b/tests/docker/common.rc
@@ -0,0 +1,28 @@
+#!/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 "$@"
+    make $MAKEFLAGS
+}
-- 
2.4.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]