From 9ae92f50b284b4f293f1208e2da7f3ba43e4a080 Mon Sep 17 00:00:00 2001 From: Adam Retter Date: Fri, 29 Jul 2016 20:55:54 +0100 Subject: [PATCH] More granular steps in the Makefile, can help with running all or single Java tests (and with ASAN build - https://github.com/facebook/rocksdb/wiki/JNI-Debugging) (#1237) --- Makefile | 6 ++++++ java/Makefile | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 442d99e997..24e1cb0871 100644 --- a/Makefile +++ b/Makefile @@ -1378,6 +1378,12 @@ rocksdbjava: $(java_libobjects) jclean: cd java;$(MAKE) clean; +jtest_compile: rocksdbjava + cd java;$(MAKE) java_test + +jtest_run: + cd java;$(MAKE) run_test + jtest: rocksdbjava cd java;$(MAKE) sample;$(MAKE) test; diff --git a/java/Makefile b/java/Makefile index fab1595671..dcfcc0d309 100644 --- a/java/Makefile +++ b/java/Makefile @@ -181,7 +181,9 @@ java_test: resolve_test_deps $(TEST_SRC)/org/rocksdb/*.java $(AM_V_at)javah -cp $(MAIN_CLASSES):$(TEST_CLASSES) -d $(NATIVE_INCLUDE) -jni $(NATIVE_JAVA_TEST_CLASSES) -test: java resolve_test_deps java_test +test: java resolve_test_deps java_test run_test + +run_test: java -ea -Xcheck:jni -Djava.library.path=target -cp "$(MAIN_CLASSES):$(TEST_CLASSES):$(JAVA_TESTCLASSPATH):target/*" org.rocksdb.test.RocksJunitRunner $(JAVA_TESTS) db_bench: java