diff --git a/Makefile b/Makefile index 5f383ed69..d434041da 100644 --- a/Makefile +++ b/Makefile @@ -820,6 +820,7 @@ clean: find . -name "*.[oda]" -exec rm -f {} \; find . -type f -regex ".*\.\(\(gcda\)\|\(gcno\)\)" -exec rm {} \; rm -rf bzip2* snappy* zlib* lz4* + cd java; $(MAKE) clean tags: ctags * -R diff --git a/java/Makefile b/java/Makefile index a6afc99d7..8f90a4ba9 100644 --- a/java/Makefile +++ b/java/Makefile @@ -137,7 +137,7 @@ clean: $(AM_V_at)rm -rf $(SAMPLES_OUTPUT) -javadocs: +javadocs: java $(AM_V_GEN)mkdir -p $(JAVADOC) $(AM_V_at)javadoc -d $(JAVADOC) -sourcepath $(MAIN_SRC) -subpackages org @@ -176,7 +176,7 @@ resolve_test_deps: test -s "$(JAVA_CGLIB_JAR)" || cp $(MVN_LOCAL)/cglib/cglib/2.2.2/cglib-2.2.2.jar $(JAVA_TEST_LIBDIR) || curl -k -L -o "$(JAVA_CGLIB_JAR)" http://search.maven.org/remotecontent?filepath=cglib/cglib/2.2.2/cglib-2.2.2.jar test -s "$(JAVA_ASSERTJ_JAR)" || cp $(MVN_LOCAL)/org/assertj/assertj-core/1.7.1/assertj-core-1.7.1.jar $(JAVA_TEST_LIBDIR) || curl -k -L -o "$(JAVA_ASSERTJ_JAR)" http://central.maven.org/maven2/org/assertj/assertj-core/1.7.1/assertj-core-1.7.1.jar -java_test: resolve_test_deps +java_test: java resolve_test_deps $(AM_V_GEN)mkdir -p $(TEST_CLASSES) $(AM_V_at)javac -cp $(MAIN_CLASSES):$(JAVA_TESTCLASSPATH) -d $(TEST_CLASSES)\ $(TEST_SRC)/org/rocksdb/test/*.java\ @@ -184,7 +184,7 @@ 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 run_test +test: java 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)