diff options
author | fjhenigman <fjhenigman@users.noreply.github.com> | 2019-03-07 01:21:24 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-07 01:21:24 +0300 |
commit | a2ef7be242bcacaa9127a3ce011602ec54b2c9ed (patch) | |
tree | 539a4ce04197640be3cd0b02a787d28f0c35abbc /kokoro | |
parent | 07f80c4df1b0619ee484c38e79a7ad71f672ca14 (diff) |
Add Linux ASAN bot configs. (#2427)
Fix the ASAN part of the bot script.
Add continuous and presubmit Linux ASAN bot configurations.
Diffstat (limited to 'kokoro')
-rw-r--r-- | kokoro/linux-clang-asan/build.sh | 24 | ||||
-rw-r--r-- | kokoro/linux-clang-asan/continuous.cfg | 16 | ||||
-rw-r--r-- | kokoro/linux-clang-asan/presubmit.cfg | 16 | ||||
-rw-r--r-- | kokoro/scripts/linux/build.sh | 5 |
4 files changed, 58 insertions, 3 deletions
diff --git a/kokoro/linux-clang-asan/build.sh b/kokoro/linux-clang-asan/build.sh new file mode 100644 index 000000000..8f86e6ec7 --- /dev/null +++ b/kokoro/linux-clang-asan/build.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# Copyright (c) 2019 Google LLC. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Linux Build Script. + +# Fail on any error. +set -e +# Display commands being run. +set -x + +SCRIPT_DIR=`dirname "$BASH_SOURCE"` +source $SCRIPT_DIR/../scripts/linux/build.sh ASAN clang diff --git a/kokoro/linux-clang-asan/continuous.cfg b/kokoro/linux-clang-asan/continuous.cfg new file mode 100644 index 000000000..3a98fc7e1 --- /dev/null +++ b/kokoro/linux-clang-asan/continuous.cfg @@ -0,0 +1,16 @@ +# Copyright (c) 2019 Google LLC. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Continuous build configuration. +build_file: "SPIRV-Tools/kokoro/linux-clang-asan/build.sh" diff --git a/kokoro/linux-clang-asan/presubmit.cfg b/kokoro/linux-clang-asan/presubmit.cfg new file mode 100644 index 000000000..ceac44ba3 --- /dev/null +++ b/kokoro/linux-clang-asan/presubmit.cfg @@ -0,0 +1,16 @@ +# Copyright (c) 2019 Google LLC. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Presubmit build configuration. +build_file: "SPIRV-Tools/kokoro/linux-clang-asan/build.sh" diff --git a/kokoro/scripts/linux/build.sh b/kokoro/scripts/linux/build.sh index d96d247aa..4796a745d 100644 --- a/kokoro/scripts/linux/build.sh +++ b/kokoro/scripts/linux/build.sh @@ -31,8 +31,7 @@ BUILD_TYPE="Debug" CMAKE_C_CXX_COMPILER="" if [ $COMPILER = "clang" ] then - sudo ln -s /usr/bin/clang-3.8 /usr/bin/clang - sudo ln -s /usr/bin/clang++-3.8 /usr/bin/clang++ + PATH=/usr/lib/llvm-3.8/bin:$PATH CMAKE_C_CXX_COMPILER="-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++" fi @@ -48,7 +47,7 @@ ADDITIONAL_CMAKE_FLAGS="" if [ $CONFIG = "ASAN" ] then ADDITIONAL_CMAKE_FLAGS="-DCMAKE_CXX_FLAGS=-fsanitize=address -DCMAKE_C_FLAGS=-fsanitize=address" - export ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer-3.4 + [ $COMPILER = "clang" ] || { echo "$CONFIG requires clang"; exit 1; } elif [ $CONFIG = "COVERAGE" ] then ADDITIONAL_CMAKE_FLAGS="-DENABLE_CODE_COVERAGE=ON" |