Skip to content
Snippets Groups Projects
Commit 5fa149c9 authored by Mick Jordan's avatar Mick Jordan
Browse files

mx.fastr: set version dependency to 5.60.0; use mx.get_runtime_jvm_args in...

mx.fastr: set version dependency to 5.60.0; use mx.get_runtime_jvm_args in preference to mx.classpath
parent 4a3c0753
No related branches found
No related tags found
No related merge requests found
......@@ -91,7 +91,7 @@ def do_run_r(args, command, extraVmArgs=None, jdk=None, **kwargs):
if not jdk:
jdk = get_default_jdk()
vmArgs = ['-cp', mx.classpath('FASTR', jdk=jdk)]
vmArgs = mx.get_runtime_jvm_args('FASTR', jdk=jdk)
vmArgs += set_graal_options()
......@@ -434,7 +434,7 @@ def testgen(args):
if version_check:
# check the version of GnuR against FastR
try:
fastr_version = subprocess.check_output([mx.get_jdk().java, '-cp', mx.classpath('com.oracle.truffle.r.runtime'), 'com.oracle.truffle.r.runtime.RVersionNumber'])
fastr_version = subprocess.check_output([mx.get_jdk().java, mx.get_runtime_jvm_args('com.oracle.truffle.r.runtime'), 'com.oracle.truffle.r.runtime.RVersionNumber'])
gnur_version = subprocess.check_output([rpath, '--version'])
if not gnur_version.startswith(fastr_version):
mx.abort('R version is incompatible with FastR, please update to ' + fastr_version)
......@@ -471,10 +471,11 @@ def rbcheck(args):
If the option --filter is not given, shows all groups.
Multiple groups can be combined: e.g. "--filter gnur-only,fastr-only"'''
cp = mx.classpath('com.oracle.truffle.r.test')
vmArgs = mx.get_runtime_jvm_args('com.oracle.truffle.r.test')
args.append("--suite-path")
args.append(mx.primary_suite().dir)
mx.run_java(['-cp', cp, 'com.oracle.truffle.r.test.tools.RBuiltinCheck'] + args)
vmArgs += ['com.oracle.truffle.r.test.tools.RBuiltinCheck']
mx.run_java(vmArgs + args)
def rbdiag(args):
'''Diagnoses FastR builtins
......@@ -503,14 +504,15 @@ def rbdiag(args):
mx rbdiag colSums --sweep
mx rbdiag com.oracle.truffle.r.library.stats.Rnorm
'''
cp = mx.classpath('com.oracle.truffle.r.nodes.test')
vmArgs = mx.get_runtime_jvm_args('com.oracle.truffle.r.nodes.test')
setREnvironment()
os.environ["FASTR_TESTGEN_GNUR"] = "internal"
# this should work for Linux and Mac:
os.environ["TZDIR"] = "/usr/share/zoneinfo/"
mx.run_java(['-cp', cp, 'com.oracle.truffle.r.nodes.test.RBuiltinDiagnostics'] + args)
vmArgs += ['com.oracle.truffle.r.nodes.test.RBuiltinDiagnostics']
mx.run_java(vmArgs + args)
def _gnur_path():
np = mx.project('com.oracle.truffle.r.native')
......
......@@ -76,18 +76,9 @@ def junit(args, harness, parser=None, jdk_default=None):
if not found:
mx.warn('no tests matched by substring "' + t + '"')
projectscp = mx.classpath([pcp.name for pcp in mx.projects(opt_limit_to_suite=True) if pcp.isJavaProject() and pcp.javaCompliance <= jdk.javaCompliance], jdk=jdk)
vmArgs += mx.get_runtime_jvm_args([pcp.name for pcp in mx.projects(opt_limit_to_suite=True) if pcp.isJavaProject() and pcp.javaCompliance <= jdk.javaCompliance], jdk=jdk)
if len(classes) != 0:
# Compiling wrt projectscp avoids a dependency on junit.jar in mxtool itself
# However, perhaps because it's Friday 13th javac is not actually compiling
# this file, yet not returning error. It is perhaps related to annotation processors
# so the workaround is to extract the junit path as that is all we need.
junitpath = [s for s in projectscp.split(":") if "junit" in s]
if len(junitpath) is 0:
junitpath = [s for s in projectscp.split(":") if "JUNIT" in s]
junitpath = junitpath[0]
if len(classes) == 1:
testClassArgs = ['--testclass', classes[0]]
else:
......@@ -95,7 +86,7 @@ def junit(args, harness, parser=None, jdk_default=None):
for c in classes:
f.write(c + '\n')
testClassArgs = ['--testsfile', testfile]
junitArgs = ['-cp', projectscp, 'com.oracle.truffle.r.test.FastRJUnitWrapper'] + testClassArgs
junitArgs = ['com.oracle.truffle.r.test.FastRJUnitWrapper'] + testClassArgs
rc = harness(args, vmArgs, jdk, junitArgs)
return rc
else:
......
......@@ -21,7 +21,7 @@
# questions.
#
suite = {
"mxversion" : "5.34.4",
"mxversion" : "5.60.0",
"name" : "fastr",
"versionConflictResolution" : "latest",
"imports" : {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment