Skip to content

Commit 486b54d

Browse files
committed
Move MultiContextCExtTest to run in its own process
1 parent a2d9b2e commit 486b54d

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
* SOFTWARE.
4040
*/
4141

42-
package org.graalvm.python.embedding.utils.test.integration;
42+
package org.graalvm.python.embedding.cext.test;
4343

4444
import static org.junit.Assert.assertEquals;
4545
import static org.junit.Assert.assertFalse;
@@ -127,7 +127,12 @@ private static Path createVenv(TestLog log, String... packages) throws IOExcepti
127127
var tmpdir = Files.createTempDirectory("graalpytest");
128128
deleteDirOnShutdown(tmpdir);
129129
var venvdir = tmpdir.resolve("venv");
130-
VFSUtils.createVenv(venvdir, Arrays.asList(packages), tmpdir.resolve("graalpy.exe"), () -> getClasspath(), "", log, log);
130+
try {
131+
VFSUtils.createVenv(venvdir, Arrays.asList(packages), tmpdir.resolve("graalpy.exe"), () -> getClasspath(), "", log, log);
132+
} catch (RuntimeException e) {
133+
System.err.println(getClasspath());
134+
throw e;
135+
}
131136
return venvdir;
132137
}
133138

mx.graalpython/mx_graalpython.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,9 @@ def __str__(self):
405405
configs += [
406406
TestConfig(vm_args + graalpy_tests + args, True),
407407
TestConfig(vm_args + graalpy_tests + args, False),
408+
# MultiContext cext tests should run by themselves so they aren't influenced by others
409+
TestConfig(vm_args + ['org.graalvm.python.embedding.cext.test'] + args + ["--use-graalvm"], True),
410+
TestConfig(vm_args + ['org.graalvm.python.embedding.cext.test'] + args + ["--use-graalvm"], False),
408411
# TCK suite is not compatible with the PythonMxUnittestConfig,
409412
# so it must have its own run and the useResources config is ignored
410413
TestConfig(vm_args + ['com.oracle.truffle.tck.tests'] + args, False),

0 commit comments

Comments
 (0)