forked from cms-sw/cms-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added new scripts for running clang tests for PR
- Loading branch information
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/bash | ||
curl -s -L https://patch-diff.githubusercontent.com/raw/cms-sw/$1/pull/$2.patch | grep '^diff --git ' | sed 's|.* a/||;s| *b/.*||' | sort | uniq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash -ex | ||
PULL_REQUEST=$1 | ||
CMS_BOT_DIR=$(dirname $0) | ||
case $CMS_BOT_DIR in /*) ;; *) CMS_BOT_DIR=$(pwd)/${CMS_BOT_DIR} ;; esac | ||
if [ "X${WORKSPACE}" = "X" ] ; then WORKSPACE=$(pwd) ; fi | ||
|
||
NUM_PROC=$(getconf _NPROCESSORS_ONLN) | ||
cd $CMSSW_BASE/src | ||
git cms-merge-topic -u ${PULL_REQUEST} | ||
scram build -j ${NUM_PROC} llvm-ccdb | ||
rm -rf ${CMSSW_BASE}/pr-changed-files-all.log ${CMSSW_BASE}/pr-changed-files-selected.log | ||
${CMS_BOT_DIR}/get-pr-changed-files cmssw ${PULL_REQUEST} > ${CMSSW_BASE}/pr-changed-files-all.log | ||
touch ${CMSSW_BASE}/pr-changed-files-selected.log | ||
for f in $(cat ${CMSSW_BASE}/pr-changed-files-all.log | grep -v '/test/') ; do | ||
if [ $(grep "/src/$f\"" $CMSSW_BASE/compile_commands.json | wc -l) -gt 0 ] ; then | ||
echo $f >> ${CMSSW_BASE}/pr-changed-files-selected.log | ||
fi | ||
done | ||
USER_CODE_CHECK_FILES=$(cat ${CMSSW_BASE}/pr-changed-files-selected.log | tr '\n' ' ') | ||
if [ "${USER_CODE_CHECK_FILES}" != "" ] ; then | ||
export USER_STYLE_CHECKS='boost-use-to-string,misc-string-compare,misc-uniqueptr-reset-release,modernize-deprecated-headers,modernize-make-shared,modernize-use-bool-literals,modernize-use-equals-delete,modernize-use-nullptr,modernize-use-override,performance-unnecessary-copy-initialization,readability-container-size-empty,readability-redundant-string-cstr,readability-static-definition-in-anonymous-namespace,readability-uniqueptr-delete-release' | ||
export USER_CODE_CHECK_FILES | ||
scram build -j ${NUM_PROC} style > ${WORKSPACE}/clang-tidy.log 2>&1 | ||
git diff > ${WORKSPACE}/${PULL_REQUEST}.diff | ||
fi |