Skip to content
Snippets Groups Projects
Commit a56efd3e authored by Stepan Sindelar's avatar Stepan Sindelar
Browse files

[GR-2798] Pkg testing support.

PullRequest: fastr/1500
parents 8b4779be 24807f92
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,8 @@ include "ci_common/common.hocon"
# The standard set of gate builds. N.B. the style/builtin checks are only run on Linux as they are not OS-dependent.
overlay = "6c3623c5f1394db280dca1243f88e61f806672f2"
# in case you want to enforce specific overlay commit, uncomment:
# overlay = "6c3623c5f1394db280dca1243f88e61f806672f2"
builds = [
${gateTestLinux} {capabilities : [linux, amd64, fast], targets : [gate], name: "gate-test-linux-amd64"}
${gateTestNoSpecialsLinux} {capabilities : [linux, amd64, fast], targets : [gate], name: "gate-test-linux-amd64-nospecials"}
......
......@@ -74,6 +74,8 @@ public enum FastROptions {
// Miscellaneous
IgnoreGraphicsCalls("Silently ignore unimplemented functions from graphics package", false),
AdditionalOptions("List of R level options default values. Syntax: 'optionName:value;optionName2:value;'. " +
"Value can be 'T' or 'F' in which case it is interpreted as boolean, otherwise as string", "", true),
StartupTiming("Records and prints various timestamps during initialization", false);
private final String help;
......
......@@ -18,8 +18,11 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.graalvm.nativeimage.ObjectHandle;
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
import com.oracle.truffle.r.launcher.RStartParams;
import com.oracle.truffle.r.runtime.RError.Message;
import com.oracle.truffle.r.runtime.context.RContext;
import com.oracle.truffle.r.runtime.context.RContext.ContextKind;
import com.oracle.truffle.r.runtime.data.RDataFactory;
......@@ -180,6 +183,27 @@ public class ROptions {
if (cranMirror != null) {
map.put("repos", cranMirror);
}
String additional = FastROptions.AdditionalOptions.getStringValue();
if (additional == null || additional.isEmpty()) {
return;
}
String[] namesValues = additional.trim().split(";");
for (int i = 0; i < namesValues.length; i++) {
String[] items = namesValues[i].trim().split(":");
if (items.length != 2) {
RError.warning(RError.NO_CALLER, Message.GENERIC, "Invalid value of AdditionalOptions option: " + namesValues[i]);
continue;
}
Object value = items[1].trim();
if (items[1].equals("T")) {
value = RRuntime.LOGICAL_TRUE;
} else if (items[1].equals("F")) {
value = RRuntime.LOGICAL_FALSE;
}
map.put(items[0], value);
}
}
private static boolean optionFromEnvVar(String envVar, REnvVars envVars) {
......
......@@ -2,3 +2,4 @@ foreign
mime
rjson
iterators
OptimalCutpoints
-DR:+IgnoreGraphicsCalls
-DR:-EmitTmpSource
-DR:AdditionalOptions=vdiffr_skip:T
\ No newline at end of file
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