Signed-off-by: Wei Liu <wei.l...@citrix.com>
---
 xtf-runner | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/xtf-runner b/xtf-runner
index ad7dcf9..17ce933 100755
--- a/xtf-runner
+++ b/xtf-runner
@@ -21,6 +21,14 @@ except ImportError:
 # Note that warning is not a state on its own.
 all_states = [ 'SUCCESS', 'SKIP', 'ERROR', 'FAILURE' ]
 
+# Return the exit code for different states.
+# Avoid using 1 and 2 because python interpreter uses them.
+def exit_code(state):
+    if state == 'SUCCESS': return 0
+    if state == 'SKIP':    return 3
+    if state == 'ERROR':   return 4
+    if state == 'FAILURE': return 5
+
 # All test categories and configurations
 all_categories   = ("special", "functional", "xsa", "utility")
 pv_environments  = ("pv64", "pv32pae")
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

Reply via email to