Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=517976
Signed-off-by: Justin Lecher <jlec@gentoo.org>
# @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
# virtx py.test --verbose
# }
# @CODE
+#
+# @CODE
+# my_test() {
+# some_command
+# return $?
+# }
+#
+# src_test() {
+# virtx my_test
+# }
+# @CODE
virtx() {
debug-print-function ${FUNCNAME} "$@"