2013-02-25 11:17:26 -08:00
|
|
|
#!/bin/bash
|
|
|
|
#A shell script for Jenknis to run valgrind on rocksdb tests
|
|
|
|
#Returns 0 on success when there are no failed tests
|
|
|
|
|
2013-08-14 13:29:05 -07:00
|
|
|
VALGRIND_DIR=build_tools/VALGRIND_LOGS
|
2013-04-23 14:16:56 -07:00
|
|
|
make clean
|
2013-03-05 17:38:13 -08:00
|
|
|
make -j$(nproc) valgrind_check
|
2013-03-08 12:29:19 -08:00
|
|
|
NUM_FAILED_TESTS=$((`wc -l $VALGRIND_DIR/valgrind_failed_tests | awk '{print $1}'` - 1))
|
2013-04-11 14:34:01 -07:00
|
|
|
if [ $NUM_FAILED_TESTS -lt 1 ]; then
|
2013-03-05 16:49:38 -08:00
|
|
|
echo No tests have valgrind errors
|
|
|
|
exit 0
|
2013-02-25 11:17:26 -08:00
|
|
|
else
|
2013-03-05 16:49:38 -08:00
|
|
|
cat $VALGRIND_DIR/valgrind_failed_tests
|
|
|
|
exit 1
|
2013-02-25 11:17:26 -08:00
|
|
|
fi
|