提交 fca88f8e 编写于 作者: S sdong

valgrind_check to exit on test failures

Summary: Currently, valgrind_check doesn't fail on test failures, which creates confusion. valgrind_check should fail if test fails.

Test Plan: Manually change tests to return test failure or cause memory leak and see valgrind_check has the correct behavior.

Reviewers: anthony, yhchiang, IslamAbdelRahman, igor, kradhakrishnan, rven

Reviewed By: rven

Subscribers: leveldb, dhruba

Differential Revision: https://reviews.facebook.net/D43629
上级 7d364d0d
......@@ -575,8 +575,11 @@ valgrind_check: $(TESTS)
for t in $(filter-out skiplist_test,$(TESTS)); do \
stime=`date '+%s'`; \
$(VALGRIND_VER) $(VALGRIND_OPTS) ./$$t; \
if [ $$? -eq $(VALGRIND_ERROR) ] ; then \
ret_code=$$?; \
if [ $$ret_code -eq $(VALGRIND_ERROR) ] ; then \
echo $$t >> $(VALGRIND_DIR)/valgrind_failed_tests; \
elif [ $$ret_code -ne 0 ]; then \
exit $$ret_code; \
fi; \
etime=`date '+%s'`; \
echo $$t $$((etime - stime)) >> $(VALGRIND_DIR)/valgrind_tests_times; \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册