2013-02-25 20:17:26 +01:00
|
|
|
#!/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=VALGRIND_LOGS
|
2013-03-06 02:38:13 +01:00
|
|
|
make -j$(nproc) valgrind_check
|
2013-03-08 21:29:19 +01:00
|
|
|
NUM_FAILED_TESTS=$((`wc -l $VALGRIND_DIR/valgrind_failed_tests | awk '{print $1}'` - 1))
|
2013-03-06 01:49:38 +01:00
|
|
|
if [ $NUM_FAILED_TESTS -le 1 ]; then
|
|
|
|
echo No tests have valgrind errors
|
|
|
|
exit 0
|
2013-02-25 20:17:26 +01:00
|
|
|
else
|
2013-03-06 01:49:38 +01:00
|
|
|
cat $VALGRIND_DIR/valgrind_failed_tests
|
|
|
|
exit 1
|
2013-02-25 20:17:26 +01:00
|
|
|
fi
|