diff --git a/com.oracle.truffle.r.test.native/urand/src/Makefile b/com.oracle.truffle.r.test.native/urand/src/Makefile index e78bd38380ee1d53af60549bb2e95f9349effe76..cf4d81e20d95b39354845957325af4aee174b1a9 100644 --- a/com.oracle.truffle.r.test.native/urand/src/Makefile +++ b/com.oracle.truffle.r.test.native/urand/src/Makefile @@ -37,13 +37,16 @@ endif INCLUDE_DIR := $(subst test.native,native,$(TOPDIR))/include -all: $(C_OBJECTS) +all: mkbin $(C_OBJECTS) ifneq ($(shell uname), Darwin) gcc -fPIC -shared -o $(C_LIB) $(C_OBJECTS) else gcc -dynamiclib -undefined dynamic_lookup -o $(C_LIB) $(C_OBJECTS) endif +mkbin: + mkdir -p $(BIN) + $(BIN)/%.o: %.c gcc -I$(INCLUDE_DIR) -fPIC -O2 -c $< -o $@ diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/rffi/TestUserRNG.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/rffi/TestUserRNG.java index e82cd897e99ceb7018f5ab8e6f1a3f02cba7216a..bca4effc45e15e8b4b535384c139f236a0a45bfc 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/rffi/TestUserRNG.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/rffi/TestUserRNG.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,14 @@ import java.nio.file.*; import org.junit.*; import com.oracle.truffle.r.runtime.*; +import com.oracle.truffle.r.runtime.ffi.*; import com.oracle.truffle.r.test.*; +/** + * Test for a user-defined random number generator. Implicitly tests {@code dyn.load} as well as the + * {@link UserRngRFFI} interface. We take care to use relative paths so the expected output file is + * portable. + */ public class TestUserRNG extends TestBase { @Test public void testUserRNG() {