Skip to content

Commit 3e4e917

Browse files
wildcard & remove testRunner.cpp
1 parent 1c639c9 commit 3e4e917

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ TESTS ?=
7575
CPP_TEST_SOURCES := test/native/testRunner.cpp $(shell find test/native -name '*Test.cpp')
7676
CPP_TEST_HEADER := test/native/testRunner.hpp
7777
CPP_TEST_INCLUDES := -Isrc -Itest/native
78-
CPP_TEST_LIB_SOURCES := test/native/testRunner.cpp $(shell find test/native/libs \( -name "*.c" -o -name "*.cpp" \))
79-
CPP_TEST_BIN_SOURCES := test/native/testRunner.cpp $(shell find test/test \( -name "*.c" -o -name "*.cpp" \))
78+
TEST_LIB_SOURCES := $(wildcard test/native/libs/*)
79+
TEST_BIN_SOURCES := $(shell find test/test \( -name "*.c" -o -name "*.cpp" \))
8080

8181
ifeq ($(JAVA_HOME),)
8282
JAVA_HOME:=$(shell java -cp . JavaHome)
@@ -225,7 +225,7 @@ build-test-cpp: build/test/cpptests build/test/build-test-libs
225225

226226
build-test: build-test-cpp build-test-java
227227

228-
build/test/build-test-libs: $(CPP_TEST_LIB_SOURCES)
228+
build/test/build-test-libs: $(TEST_LIB_SOURCES)
229229
@mkdir -p $(TEST_LIB_DIR)
230230
$(CC) -shared -fPIC -o $(TEST_LIB_DIR)/libreladyn.$(SOEXT) test/native/libs/reladyn.c
231231
$(CC) -shared -fPIC -o $(TEST_LIB_DIR)/libcallsmalloc.$(SOEXT) test/native/libs/callsmalloc.c
@@ -246,7 +246,7 @@ ifeq ($(OS_TAG),linux)
246246
endif
247247
@touch $@
248248

249-
build/test/build-test-bins: $(CPP_TEST_BIN_SOURCES)
249+
build/test/build-test-bins: $(TEST_BIN_SOURCES)
250250
@mkdir -p $(TEST_BIN_DIR)
251251
$(CC) -o $(TEST_BIN_DIR)/malloc_plt_dyn test/test/nativemem/malloc_plt_dyn.c
252252
$(CC) -o $(TEST_BIN_DIR)/native_api -Isrc test/test/c/native_api.c -ldl
@@ -258,7 +258,7 @@ build/test/build-test-bins: $(CPP_TEST_BIN_SOURCES)
258258
@touch $@
259259

260260
test-cpp: build-test-cpp
261-
@echo "Running cpp tests..."
261+
echo "Running cpp tests..."
262262
LD_LIBRARY_PATH="$(TEST_LIB_DIR)" DYLD_LIBRARY_PATH="$(TEST_LIB_DIR)" build/test/cpptests
263263

264264
test-java: build-test-java

test/Infinite.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
public class Infinite {
2+
3+
public static void main(String[] args) throws InterruptedException {
4+
5+
while (true) {
6+
Thread.sleep(1000);
7+
System.out.println("Sleeping");
8+
}
9+
}
10+
}

0 commit comments

Comments
 (0)