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

test install pakages OS indepdence fixes

parent 905ae135
Branches
No related tags found
No related merge requests found
...@@ -33,14 +33,17 @@ source="${BASH_SOURCE[0]}" ...@@ -33,14 +33,17 @@ source="${BASH_SOURCE[0]}"
while [ -h "$source" ] ; do source="$(readlink "$source")"; done while [ -h "$source" ] ; do source="$(readlink "$source")"; done
PRIMARY_PATH="$( cd -P "$( dirname "$source" )" && pwd )"/../.. PRIMARY_PATH="$( cd -P "$( dirname "$source" )" && pwd )"/../..
mx=`which mx` which mx >/dev/null 2>&1
if [ -z "$mx"] ; then whichrc=$?
if [ $whichrc == 1 ] ; then
if [ -z "$MX_HOME" ] ; then if [ -z "$MX_HOME" ] ; then
echo "Error: mx cannot be found: add to PATH or set MX_HOME" echo "Error: mx cannot be found: add to PATH or set MX_HOME"
exit 1 exit 1
else else
mx=$MX_HOME/mx mx=$MX_HOME/mx
fi fi
else
mx=`which mx`
fi fi
exec $mx $MX_R_GLOBAL_ARGS R $MX_R_CMD_ARGS "$@" exec $mx $MX_R_GLOBAL_ARGS R $MX_R_CMD_ARGS "$@"
...@@ -29,14 +29,17 @@ source="${BASH_SOURCE[0]}" ...@@ -29,14 +29,17 @@ source="${BASH_SOURCE[0]}"
while [ -h "$source" ] ; do source="$(readlink "$source")"; done while [ -h "$source" ] ; do source="$(readlink "$source")"; done
PRIMARY_PATH="$( cd -P "$( dirname "$source" )" && pwd )"/../.. PRIMARY_PATH="$( cd -P "$( dirname "$source" )" && pwd )"/../..
mx=`which mx` which mx >/dev/null 2>&1
if [ -z "$mx"] ; then whichrc=$?
if [ $whichrc == 1 ] ; then
if [ -z "$MX_HOME" ] ; then if [ -z "$MX_HOME" ] ; then
echo "Error: mx cannot be found: add to PATH or set MX_HOME" echo "Error: mx cannot be found: add to PATH or set MX_HOME"
exit 1 exit 1
else else
mx=$MX_HOME/mx mx=$MX_HOME/mx
fi fi
else
mx=`which mx`
fi fi
exec $mx $MX_R_GLOBAL_ARGS Rscript $MX_R_CMD_ARGS "$@" exec $mx $MX_R_GLOBAL_ARGS Rscript $MX_R_CMD_ARGS "$@"
...@@ -85,7 +85,7 @@ public class TestRPackages extends TestBase { ...@@ -85,7 +85,7 @@ public class TestRPackages extends TestBase {
Map<String, String> env = pb.environment(); Map<String, String> env = pb.environment();
env.put("R_LIBS_USER", rpackagesLibs.toString()); env.put("R_LIBS_USER", rpackagesLibs.toString());
if (!generatingExpected()) { if (!generatingExpected()) {
env.put("R_INSTALL_TAR", "/usr/bin/tar"); env.put("R_INSTALL_TAR", REnvVars.get("TAR"));
} }
try { try {
if (FastROptions.debugMatches("TestRPackages")) { if (FastROptions.debugMatches("TestRPackages")) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment