diff options
-rw-r--r-- | .travis.yml | 6 | ||||
-rwxr-xr-x | clang-tidy-diff.sh | 7 |
2 files changed, 7 insertions, 6 deletions
diff --git a/.travis.yml b/.travis.yml index d0408cde5..9eae2c30f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -65,13 +65,7 @@ jobs: - BUILD_SUBDIR=${BUILD_SUBDIR:-.} - mkdir -p ${BUILD_SUBDIR} && cd ${BUILD_SUBDIR} - cmake ${TRAVIS_BUILD_DIR} -DCMAKE_C_FLAGS="$COMPILER_FLAGS" -DCMAKE_CXX_FLAGS="$COMPILER_FLAGS" -DCMAKE_INSTALL_PREFIX=install -DCMAKE_EXPORT_COMPILE_COMMANDS=ON - - pwd - - ls - - cd ${TRAVIS_BUILD_DIR} - - pwd - - ls - ./clang-tidy-diff.sh - - cd - - make -j2 install - ./check.py --binaryen-bin=${BUILD_SUBDIR}/install/bin diff --git a/clang-tidy-diff.sh b/clang-tidy-diff.sh index ac9de4007..4d62d95c6 100755 --- a/clang-tidy-diff.sh +++ b/clang-tidy-diff.sh @@ -1,4 +1,11 @@ #!/bin/bash + +# In settings in which build directory is different than binaryen/, we don't +# don't have this file in binaryen/, so we skip the test. +if [ ! -f compile_commands.json ] + exit 0 +fi + CLANG_DIR=$(dirname $(dirname $(which clang-tidy))) CLANG_TIDY_DIFF=$CLANG_DIR/share/clang/clang-tidy-diff.py MERGE_BASE=$(git merge-base master HEAD) |