-
Notifications
You must be signed in to change notification settings - Fork 249
/
Copy pathrun-ib-iwyu
executable file
·31 lines (29 loc) · 1.01 KB
/
run-ib-iwyu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash -ex
CMS_BOT_DIR=$(dirname $0)
case $CMS_BOT_DIR in /*) ;; *) CMS_BOT_DIR=$(pwd)/${CMS_BOT_DIR} ;; esac
cd $LOCALRT
rm -rf src
cp -r $CMSSW_RELEASE_BASE/src src
find src -maxdepth 2 -type l -exec rm -f {} \;
CPUS=`nproc`
BUILD_LOG=yes scram b -k -j $CPUS compile COMPILER=iwyu || true
scram build -f buildlog
if [ -d tmp/$SCRAM_ARCH/cache/log/src ] ; then
for logfile in `find tmp/$SCRAM_ARCH/cache/log/src -name 'build.log' -type f` ; do
DIR=`echo $logfile | cut -d/ -f6,7`
mkdir -p iwyu/$DIR
${CMS_BOT_DIR}/parse_iwyu_logs.py $logfile $CMSSW_VERSION >iwyu/$DIR/index.html
cp $logfile iwyu/$DIR
done
fi
if [ ! $(ls -A $LOCALRT/iwyu | wc -l) -eq 0 ]; then
pushd $LOCALRT/iwyu
tar czf iwyu.tar.gz *
popd
mkdir $WORKSPACE/results
mv $LOCALRT/iwyu/iwyu.tar.gz $WORKSPACE/results
mv $LOCALRT/stats.json $WORKSPACE/results
sed -i 's/}{/,/g' $WORKSPACE/results/stats.json
source $CMS_BOT_DIR/jenkins-artifacts
send_jenkins_artifacts $WORKSPACE/results/ iwyu/${RELEASE_FORMAT}/${ARCHITECTURE}
fi