Skip to content

Instantly share code, notes, and snippets.

@chirino
Created October 1, 2012 19:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chirino/900493bd9ffb997c03ec to your computer and use it in GitHub Desktop.
Save chirino/900493bd9ffb997c03ec to your computer and use it in GitHub Desktop.
diff --git a/proton-j/src/test/java/org/apache/qpid/proton/test/JythonTest.java b/proton-j/src/test/java/org/apache/qpid/proton/test/JythonTest.java
index f549dfe..d2071ba 100644
--- a/proton-j/src/test/java/org/apache/qpid/proton/test/JythonTest.java
+++ b/proton-j/src/test/java/org/apache/qpid/proton/test/JythonTest.java
@@ -22,6 +22,8 @@ package org.apache.qpid.proton.test;
import org.junit.Test;
import static org.junit.Assert.*;
+
+import org.python.core.PyException;
import org.python.util.PythonInterpreter;
import java.io.File;
@@ -64,7 +66,15 @@ public class JythonTest
"sys.path.insert(0,\""+classesDir.getCanonicalPath()+"\")\n"+
"sys.path.insert(0,\""+testDir.getCanonicalPath()+"\")\n"
);
- interp.execfile(new File(testDir, "proton-test").getCanonicalPath());
+ try {
+ interp.execfile(new File(testDir, "proton-test").getCanonicalPath());
+ } catch (PyException e) {
+ if( e.type.toString().equals("<type 'exceptions.SystemExit'>") && e.value.toString().equals("0") ) {
+ // Build succeeded.
+ } else {
+ throw e;
+ }
+ }
}
diff --git a/tests/proton-test b/tests/proton-test
index a2ceba3..2a163bc 100755
--- a/tests/proton-test
+++ b/tests/proton-test
@@ -623,7 +623,7 @@ if not list_only:
if xmlr:
xmlr.end()
-if failed or skipped:
+if failed:
sys.exit(1)
else:
sys.exit(0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment