From 5fa149c9b89de7a34134b00b628392e75077293c Mon Sep 17 00:00:00 2001 From: Mick Jordan <mick.jordan@oracle.com> Date: Sat, 26 Nov 2016 13:39:10 -0800 Subject: [PATCH] mx.fastr: set version dependency to 5.60.0; use mx.get_runtime_jvm_args in preference to mx.classpath --- mx.fastr/mx_fastr.py | 14 ++++++++------ mx.fastr/mx_fastr_junit.py | 13 ++----------- mx.fastr/suite.py | 2 +- 3 files changed, 11 insertions(+), 18 deletions(-) diff --git a/mx.fastr/mx_fastr.py b/mx.fastr/mx_fastr.py index c9044b2965..21b2191798 100644 --- a/mx.fastr/mx_fastr.py +++ b/mx.fastr/mx_fastr.py @@ -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') diff --git a/mx.fastr/mx_fastr_junit.py b/mx.fastr/mx_fastr_junit.py index 71e26428b5..98aa47d398 100644 --- a/mx.fastr/mx_fastr_junit.py +++ b/mx.fastr/mx_fastr_junit.py @@ -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: diff --git a/mx.fastr/suite.py b/mx.fastr/suite.py index 08c061c0ba..2166292810 100644 --- a/mx.fastr/suite.py +++ b/mx.fastr/suite.py @@ -21,7 +21,7 @@ # questions. # suite = { - "mxversion" : "5.34.4", + "mxversion" : "5.60.0", "name" : "fastr", "versionConflictResolution" : "latest", "imports" : { -- GitLab