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

embedded test: set option to allow unresolved symbols on Linux

parent ff307d5d
No related branches found
No related tags found
No related merge requests found
......@@ -99,11 +99,6 @@ class StringConsoleHandler implements ConsoleHandler {
this.prompt = prompt;
}
@Override
public int getWidth() {
return RContext.CONSOLE_WIDTH;
}
@Override
public String getInputDescription() {
return inputDescription;
......
......@@ -526,7 +526,7 @@ public abstract class PrettyPrinterNode extends RNode {
maxPositionLength = intString(vector.getLength()).length();
leftWidth = maxPositionLength + 2; // There is [] around the number.
}
int forColumns = RContext.getInstance().getConsoleHandler().getWidth() - leftWidth;
int forColumns = (int) RContext.getInstance().stateROptions.getValue("width") - leftWidth;
int numberOfColumns = Math.max(1, forColumns / columnWidth);
int index = 0;
......@@ -1742,7 +1742,7 @@ public abstract class PrettyPrinterNode extends RNode {
for (; colInd < dataColWidths.length; colInd++) {
boolean hasNegative = dataColWidths[colInd] < 0;
totalWidth += Math.abs(dataColWidths[colInd]) + ((isDoubleVector || isComplexVector) && hasNegative ? 2 : 1);
if (totalWidth > RContext.getInstance().getConsoleHandler().getWidth()) {
if (totalWidth > (int) RContext.getInstance().stateROptions.getValue("name")) {
if (colInd == startColInd) {
// the first column is already too wide but needs to be printed
// nevertheless
......
......@@ -25,6 +25,12 @@ ifeq ($(TOPDIR),)
TOPDIR = $(abspath ..)
endif
OSNAME := $(shell uname)
ifeq ($(OSNAME), Linux)
LD_FLAGS := -Wl,--unresolved-symbols=ignore-all
endif
FASTR_LIB_DIR = $(abspath ../../lib)
NATIVE_PROJECT = $(subst test.native,native,$(TOPDIR))
......@@ -41,11 +47,14 @@ INCLUDE_DIR := $(NATIVE_PROJECT)/include
all: $(OBJ)/main
$(OBJ)/main: | $(OBJ)
$(OBJ):
mkdir -p $(OBJ)
$(OBJ)/main: $(SRC)/main.c
$(CC) $(CFLAGS) -I$(INCLUDE_DIR) $< -o main -L $(FASTR_LIB_DIR) -ldl -lR
$(CC) $(CFLAGS) -I$(INCLUDE_DIR) $< -o $(OBJ)/main -L $(FASTR_LIB_DIR) -ldl -lR $(LD_FLAGS)
clean:
rm -rf $(OBJ)
......@@ -115,11 +115,6 @@ public final class FastRSession implements RSession {
buffer.delete(0, buffer.length());
}
@Override
public int getWidth() {
return RContext.CONSOLE_WIDTH;
}
@Override
public String getInputDescription() {
return "<test input>";
......
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