Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
QueryR
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julien Lopez
QueryR
Commits
e5c2190f
Commit
e5c2190f
authored
10 years ago
by
Mick Jordan
Browse files
Options
Downloads
Patches
Plain Diff
set native library path for units tests; fail if R_PROFILE_USER set for unit tests
parent
ae366fd1
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mx.fastr/mx_fastr.py
+18
-10
18 additions, 10 deletions
mx.fastr/mx_fastr.py
with
18 additions
and
10 deletions
mx.fastr/mx_fastr.py
+
18
−
10
View file @
e5c2190f
...
...
@@ -33,16 +33,8 @@ def _runR(args, className, nonZeroIsFatal=True, extraVmArgs=None, runBench=False
# extraVmArgs is not normally necessary as the global --J option can be used running R/RScript
# However, the bench command invokes other Java VMs along the way, so it must use extraVmArgs
os
.
environ
[
'
R_HOME
'
]
=
_fastr_suite
.
dir
_set_libpath
()
# Set up path for Lapack libraries
osname
=
platform
.
system
()
lib_base
=
join
(
_fastr_suite
.
dir
,
'
com.oracle.truffle.r.native
'
,
'
lib
'
,
osname
.
lower
())
lib_value
=
lib_base
if
osname
==
'
Darwin
'
:
lib_env
=
'
DYLD_FALLBACK_LIBRARY_PATH
'
lib_value
=
lib_value
+
os
.
pathsep
+
'
/usr/lib
'
else
:
lib_env
=
'
LD_LIBRARY_PATH
'
os
.
environ
[
lib_env
]
=
lib_value
vmArgs
=
[
'
-cp
'
,
mx
.
classpath
(
"
com.oracle.truffle.r.shell
"
)]
if
runBench
==
False
:
vmArgs
=
vmArgs
+
[
'
-ea
'
,
'
-esa
'
]
...
...
@@ -58,6 +50,17 @@ def runRscriptCommand(args, nonZeroIsFatal=True):
'''
run Rscript file
'''
return
_runR
(
args
,
"
com.oracle.truffle.r.shell.RscriptCommand
"
,
nonZeroIsFatal
=
nonZeroIsFatal
)
def
_set_libpath
():
osname
=
platform
.
system
()
lib_base
=
join
(
_fastr_suite
.
dir
,
'
com.oracle.truffle.r.native
'
,
'
lib
'
,
osname
.
lower
())
lib_value
=
lib_base
if
osname
==
'
Darwin
'
:
lib_env
=
'
DYLD_FALLBACK_LIBRARY_PATH
'
lib_value
=
lib_value
+
os
.
pathsep
+
'
/usr/lib
'
else
:
lib_env
=
'
LD_LIBRARY_PATH
'
os
.
environ
[
lib_env
]
=
lib_value
def
findbugs
(
args
):
'''
run FindBugs against non-test Java projects
'''
findBugsHome
=
mx
.
get_env
(
'
FINDBUGS_HOME
'
,
None
)
...
...
@@ -209,6 +212,8 @@ def _junit_r_harness(args, vmArgs, junitArgs):
# suppress Truffle compilation by using a high threshold
vmArgs
+=
[
'
-G:TruffleCompilationThreshold=100000
'
]
_set_libpath
()
return
mx_graal
.
vm
(
vmArgs
+
junitArgs
,
vm
=
"
server
"
,
nonZeroIsFatal
=
False
)
def
junit
(
args
):
...
...
@@ -221,10 +226,13 @@ def junit(args):
parser
.
add_argument
(
'
--gen-diff-output
'
,
action
=
'
store
'
,
metavar
=
'
<path>
'
,
help
=
'
generate difference test output file
'
)
# parser.add_argument('--test-methods', action='store', help='pattern to match test methods in test classes')
if
os
.
environ
.
has_key
(
'
R_PROFILE_USER
'
):
mx
.
abort
(
'
unset R_PROFILE_USER before running unit tests
'
)
return
mx
.
junit
(
args
,
_junit_r_harness
,
parser
=
parser
)
def
junit_simple
(
args
):
return
junit
([
'
--tests
'
,
'
com.oracle.truffle.r.test.simple
'
]
+
args
)
return
junit
([
'
--tests
'
,
_default_unit_tests
()
]
+
args
)
def
_default_unit_tests
():
return
'
com.oracle.truffle.r.test.simple
'
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment