Skip to content

Commit c8e8396

Browse files
woessimanemamri
authored andcommitted
Disable class-path isolation for js unit tests and testnodeinstrument.
1 parent 42d6e95 commit c8e8396

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

graal-js/mx.graal-js/mx_graal_js.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
import mx_graal_js_benchmark
3333
import mx, mx_sdk, mx_urlrewrites
3434
from mx_gate import Tags, Task, add_gate_runner, prepend_gate_runner
35+
36+
import mx_unittest
3537
from mx_unittest import unittest
3638

3739
_suite = mx.suite('graal-js')
@@ -139,6 +141,12 @@ def _graal_js_gate_runner(args, tasks):
139141
finally:
140142
os.unlink(jsonResultsFile)
141143

144+
def _unittest_config_participant(config):
145+
(vmArgs, mainClass, mainClassArgs) = config
146+
vmArgs += ['-Dpolyglotimpl.DisableClassPathIsolation=true']
147+
return (vmArgs, mainClass, mainClassArgs)
148+
149+
mx_unittest.add_config_participant(_unittest_config_participant)
142150
prepend_gate_runner(_suite, _graal_js_pre_gate_runner)
143151
add_gate_runner(_suite, _graal_js_gate_runner)
144152

graal-nodejs/mx.graal-nodejs/mx_graal_nodejs.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,8 +365,9 @@ def node(args, add_graal_vm_args=True, nonZeroIsFatal=True, out=None, err=None,
365365
def testnodeInstrument(args, nonZeroIsFatal=True, out=None, err=None, cwd=None):
366366
instrument_cp = mx.classpath(['TRUFFLENODE_TEST'])
367367
_setEnvVar('NODE_JVM_CLASSPATH', instrument_cp)
368+
_setEnvVar('NODE_JVM_OPTIONS', ' '.join(['-ea', '-Dpolyglotimpl.DisableClassPathIsolation=true']))
368369
test = join(_suite.dir, 'test', 'graal', 'instrument', 'async-test.js')
369-
node(['--experimental-options', '--testing-agent', '-ea', test], nonZeroIsFatal=nonZeroIsFatal, out=out, err=err, cwd=cwd)
370+
node(['--experimental-options', '--testing-agent', test], nonZeroIsFatal=nonZeroIsFatal, out=out, err=err, cwd=cwd)
370371
node(['--experimental-options', '--broken-instrument', '-e', '6*7'], nonZeroIsFatal=nonZeroIsFatal, out=out, err=err, cwd=cwd)
371372
node(['--experimental-options', '--coverage-like-instrument', '-e', '6*7'], nonZeroIsFatal=nonZeroIsFatal, out=out, err=err, cwd=cwd)
372373

0 commit comments

Comments
 (0)