diff --git a/Makefile b/Makefile index 08f3be950..c96e61cd0 100644 --- a/Makefile +++ b/Makefile @@ -212,7 +212,6 @@ GTEST = $(GTEST_DIR)/gtest/gtest-all.o TESTUTIL = ./util/testutil.o TESTHARNESS = ./util/testharness.o $(TESTUTIL) $(MOCKOBJECTS) $(GTEST) VALGRIND_ERROR = 2 -VALGRIND_DIR = build_tools/VALGRIND_LOGS VALGRIND_VER := $(join $(VALGRIND_VER),valgrind) VALGRIND_OPTS = --error-exitcode=$(VALGRIND_ERROR) --leak-check=full @@ -575,20 +574,12 @@ asan_crash_test: $(MAKE) clean valgrind_check: $(TESTS) - mkdir -p $(VALGRIND_DIR) - echo TESTS THAT HAVE VALGRIND ERRORS > $(VALGRIND_DIR)/valgrind_failed_tests; \ - echo TIMES in seconds TAKEN BY TESTS ON VALGRIND > $(VALGRIND_DIR)/valgrind_tests_times; \ for t in $(filter-out skiplist_test,$(TESTS)); do \ - stime=`date '+%s'`; \ $(VALGRIND_VER) $(VALGRIND_OPTS) ./$$t; \ ret_code=$$?; \ - if [ $$ret_code -eq $(VALGRIND_ERROR) ] ; then \ - echo $$t >> $(VALGRIND_DIR)/valgrind_failed_tests; \ - elif [ $$ret_code -ne 0 ]; then \ + if [ $$ret_code -ne 0 ]; then \ exit $$ret_code; \ fi; \ - etime=`date '+%s'`; \ - echo $$t $$((etime - stime)) >> $(VALGRIND_DIR)/valgrind_tests_times; \ done analyze: clean diff --git a/build_tools/rocksdb-lego-determinator b/build_tools/rocksdb-lego-determinator index e39a0ac71..f0516fd8c 100755 --- a/build_tools/rocksdb-lego-determinator +++ b/build_tools/rocksdb-lego-determinator @@ -284,7 +284,7 @@ VALGRIND_TEST_COMMANDS="[ $CLEANUP_ENV, { 'name':'Run RocksDB debug unit tests', - 'shell':'$DISABLE_JEMALLOC $SHM $DEBUG ./build_tools/valgrind_test.sh', + 'shell':'$DISABLE_JEMALLOC $SHM $DEBUG make valgrind_check', 'user':'root' }, ], diff --git a/build_tools/valgrind_test.sh b/build_tools/valgrind_test.sh deleted file mode 100755 index 648a0d20e..000000000 --- a/build_tools/valgrind_test.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -#A shell script for Jenknis to run valgrind on rocksdb tests -#Returns 0 on success when there are no failed tests - -VALGRIND_DIR=build_tools/VALGRIND_LOGS -make clean -make -j$(nproc) valgrind_check -if [ $? -ne 0 ]; then - cat $VALGRIND_DIR/valgrind_failed_tests - exit 1 -fi - -NUM_FAILED_TESTS=$((`wc -l $VALGRIND_DIR/valgrind_failed_tests | awk '{print $1}'` - 1)) -if [ $NUM_FAILED_TESTS -lt 1 ]; then - echo No tests have valgrind errors - exit 0 -else - cat $VALGRIND_DIR/valgrind_failed_tests - exit 1 -fi