| Index: slave/skia_slave_scripts/run-clang-static-analyzer.sh
|
| diff --git a/slave/skia_slave_scripts/run-clang-static-analyzer.sh b/slave/skia_slave_scripts/run-clang-static-analyzer.sh
|
| deleted file mode 100755
|
| index 5d05e65963835be2b29ff49c749c6bd36dd74078..0000000000000000000000000000000000000000
|
| --- a/slave/skia_slave_scripts/run-clang-static-analyzer.sh
|
| +++ /dev/null
|
| @@ -1,64 +0,0 @@
|
| -#!/bin/bash
|
| -#
|
| -# Runs the clang static analyzer on trunk and stores its results in a directory
|
| -# in Skia's Google Storage.
|
| -# By default the results are stored here:
|
| -# https://storage.cloud.google.com/chromium-skia-gm/static_analyzers/clang_static_analyzer/index.html
|
| -#
|
| -# Sample Usage:
|
| -# STATIC_ANALYZER_TEMPDIR=/tmp/clang-static-analyzer \
|
| -# SKIA_GOOGLE_STORAGE_BASE=gs://chromium-skia-gm \
|
| -# bash update-buildbot-pydoc.sh
|
| -
|
| -
|
| -# Initialize and validate environment variables.
|
| -STATIC_ANALYZER_TEMPDIR=${STATIC_ANALYZER_TEMPDIR:-/tmp/clang-static-analyzer}
|
| -SKIA_GOOGLE_STORAGE_BASE=${SKIA_GOOGLE_STORAGE_BASE:-gs://chromium-skia-gm}
|
| -GOOGLE_STORAGE_CLANG_URL="https://storage.cloud.google.com/chromium-skia-gm/static_analyzers/clang_static_analyzer/"
|
| -
|
| -if [[ $SKIA_GOOGLE_STORAGE_BASE =~ ^gs://.* ]]; then
|
| - if [[ "$SKIA_GOOGLE_STORAGE_BASE" =~ ^gs://.+/.+ ]]; then
|
| - echo -e "\n\nPlease only specify the Google Storage base to use. Eg: gs://chromium-skia-gm. Provided value: $SKIA_GOOGLE_STORAGE_BASE"
|
| - exit 1
|
| - fi
|
| -else
|
| - echo -e "\n\nSKIA_GOOGLE_STORAGE_BASE must start with gs://. Provided value: $SKIA_GOOGLE_STORAGE_BASE"
|
| - exit 1
|
| -fi
|
| -
|
| -SKIA_GOOGLE_STORAGE_STATIC_ANALYSIS_DIR=${SKIA_GOOGLE_STORAGE_BASE}/static_analyzers/clang_static_analyzer
|
| -
|
| -
|
| -# Clean and create the temporary directory.
|
| -if [ -d "$STATIC_ANALYZER_TEMPDIR" ]; then
|
| - rm -rf $STATIC_ANALYZER_TEMPDIR
|
| -fi
|
| -mkdir -p $STATIC_ANALYZER_TEMPDIR
|
| -
|
| -make clean
|
| -
|
| -# Run the clang static analyzer.
|
| -# Details about the analyzer are here: http://clang-analyzer.llvm.org/.
|
| -CXX=`which clang++` CC=`which clang` scan-build -o $STATIC_ANALYZER_TEMPDIR make -j30
|
| -
|
| -ret_code=$?
|
| -if [ $ret_code != 0 ]; then
|
| - echo "Error while executing the scan-build command"
|
| - exit $ret_code
|
| -fi
|
| -
|
| -
|
| -# Fix static file paths to point to storage.cloud.google.com else the files will not be found.
|
| -INDEX_FILES=$STATIC_ANALYZER_TEMPDIR/*/index.html
|
| -sed -i 's|href=\"|href=\"'$GOOGLE_STORAGE_CLANG_URL'|g' $INDEX_FILES
|
| -sed -i 's|src=\"|src=\"'$GOOGLE_STORAGE_CLANG_URL'|g' $INDEX_FILES
|
| -
|
| -
|
| -# Clean the SKIA_GOOGLE_STORAGE_STATIC_ANALYSIS_DIR.
|
| -gsutil rm ${SKIA_GOOGLE_STORAGE_STATIC_ANALYSIS_DIR}/*
|
| -# Copy analysis results to SKIA_GOOGLE_STORAGE_STATIC_ANALYSIS_DIR.
|
| -gsutil cp -a public-read $STATIC_ANALYZER_TEMPDIR/*/* $SKIA_GOOGLE_STORAGE_STATIC_ANALYSIS_DIR/
|
| -
|
| -
|
| -echo -e "\n\nThe scan-build results are available to view here: https://storage.cloud.google.com/${SKIA_GOOGLE_STORAGE_STATIC_ANALYSIS_DIR:5}/index.html"
|
| -
|
|
|