summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2015-12-07 13:31:32 +0100
committerJustin Lecher <jlec@gentoo.org>2015-12-07 13:32:29 +0100
commitb016e3fcd2efdb8c70d6ee8d53f63f729d5ba916 (patch)
treeb4d8f03e2e4c8e8b3272973107fc852fb36a2179 /eclass/virtualx.eclass
parentsci-libs/cbflib: Drop old (diff)
downloadgentoo-b016e3fcd2efdb8c70d6ee8d53f63f729d5ba916.tar.gz
gentoo-b016e3fcd2efdb8c70d6ee8d53f63f729d5ba916.tar.bz2
gentoo-b016e3fcd2efdb8c70d6ee8d53f63f729d5ba916.zip
virtualx.eclass: Add verbose warning about nonfatal call
Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=517976 Signed-off-by: Justin Lecher <jlec@gentoo.org>
Diffstat (limited to 'eclass/virtualx.eclass')
-rw-r--r--eclass/virtualx.eclass21
1 files changed, 21 insertions, 0 deletions
diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
index 8a6ee88a70b9..db1ecfa58b17 100644
--- a/eclass/virtualx.eclass
+++ b/eclass/virtualx.eclass
@@ -111,6 +111,16 @@ virtualmake() {
# @DESCRIPTION:
# Start new Xvfb session and run commands in it.
#
+# IMPORTANT: The command is run nonfatal !!!
+#
+# This means we are checking for the return code and raise an exception if it
+# isn't 0. So you need to make sure that all commands return a proper
+# code and not just die. All eclass function used should support nonfatal
+# calls properly.
+#
+# The rational behind this is the tear down of the started Xfvb session. A
+# straight die would leave a running session behind.
+#
# Example:
#
# @CODE
@@ -124,6 +134,17 @@ virtualmake() {
# virtx py.test --verbose
# }
# @CODE
+#
+# @CODE
+# my_test() {
+# some_command
+# return $?
+# }
+#
+# src_test() {
+# virtx my_test
+# }
+# @CODE
virtx() {
debug-print-function ${FUNCNAME} "$@"