From ffe40c9f94373aaed0ee2f416f4325354a8dbf29 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Fri, 12 Jun 2020 10:44:12 -0700 Subject: [PATCH] Only run Valgrind if it is present. --- kokoro/ubuntu/build.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kokoro/ubuntu/build.sh b/kokoro/ubuntu/build.sh index e050f542d2..2174e8aa57 100644 --- a/kokoro/ubuntu/build.sh +++ b/kokoro/ubuntu/build.sh @@ -32,5 +32,8 @@ if [[ $(uname) = "Linux" ]]; then # For some reason kokoro doesn't have Clang available right now. #CC=clang CXX=clang++ bazel test -c dbg --copt=-fsanitize=undefined --copt=-fno-sanitize=function,vptr --linkopt=-fsanitize=undefined --action_env=UBSAN_OPTIONS=halt_on_error=1:print_stacktrace=1 -- :all -:test_lua +fi + +if which valgrind; then bazel test --run_under='valgrind --leak-check=full --error-exitcode=1' :all -- -:test_conformance_upb -:cmake_build fi