From 4b3438d2d6a35dd10ea9c80b3c74944c149d3565 Mon Sep 17 00:00:00 2001 From: Islam AbdelRahman Date: Thu, 25 Aug 2016 11:02:39 -0700 Subject: [PATCH] Fix parallel valgrind (valgrind_check) Summary: I just realized that when we run parallel valgrind we actually don't run the parallel tests under valgrind (we run the normally) This patch make sure that we run both parallel and non-parallel tests with valgrind Test Plan: DISABLE_JEMALLOC=1 make valgrind_check -j64 Reviewers: andrewkr, yiwu, lightmark, sdong Reviewed By: sdong Subscribers: andrewkr, dhruba Differential Revision: https://reviews.facebook.net/D62469 --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 5a9081707..c3e055a26 100644 --- a/Makefile +++ b/Makefile @@ -570,7 +570,7 @@ $(parallel_tests): $(PARALLEL_TEST) '#!/bin/sh' \ "d=\$(TMPD)$$TEST_SCRIPT" \ 'mkdir -p $$d' \ - "TEST_TMPDIR=\$$d ./$$TEST_BINARY --gtest_filter=$$TEST_NAME" \ + "TEST_TMPDIR=\$$d $(DRIVER) ./$$TEST_BINARY --gtest_filter=$$TEST_NAME" \ > $$TEST_SCRIPT; \ chmod a=rx $$TEST_SCRIPT; \ done @@ -643,8 +643,8 @@ valgrind_check_0: | $(prioritize_long_running_tests) \ | grep -E '$(tests-regexp)' \ | build_tools/gnu_parallel -j$(J) --plain --joblog=LOG $$eta --gnu \ - 'if [[ "{}" == "./"* ]] ; then $(DRIVER) {} >& t/valgrind_log-{/}; ' \ - 'else {} >& t/valgrind_log-{/}; fi' + '(if [[ "{}" == "./"* ]] ; then $(DRIVER) {}; else {}; fi) ' \ + '>& t/valgrind_log-{/}' CLEAN_FILES += t LOG $(TMPD) @@ -721,7 +721,7 @@ ubsan_crash_test: $(MAKE) clean valgrind_check: $(TESTS) - $(MAKE) gen_parallel_tests + $(MAKE) DRIVER="$(VALGRIND_VER) $(VALGRIND_OPTS)" gen_parallel_tests $(AM_V_GEN)if test "$(J)" != 1 \ && (build_tools/gnu_parallel --gnu --help 2>/dev/null) | \ grep -q 'GNU Parallel'; \