You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2014/05/08 06:51:15 UTC
git commit: Parallelize the verification process. Add clang static
analysis
Repository: trafficserver
Updated Branches:
refs/heads/master bb64b54b7 -> 387bb9a5b
Parallelize the verification process. Add clang static analysis
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/387bb9a5
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/387bb9a5
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/387bb9a5
Branch: refs/heads/master
Commit: 387bb9a5bacab4c3c310d3da2d59fc033eca42a0
Parents: bb64b54
Author: Leif Hedstrom <zw...@apache.org>
Authored: Wed May 7 21:50:46 2014 -0700
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Wed May 7 21:50:46 2014 -0700
----------------------------------------------------------------------
ci/jenkins/bin/clang-analyzer.sh | 23 +++++++++++++++++++++++
ci/jenkins/bin/in_tree.sh | 15 ++++-----------
ci/jenkins/bin/out_of_tree.sh | 8 +++++---
ci/jenkins/bin/rat.sh | 12 +++++++-----
ci/jenkins/bin/snapshot.sh | 18 +++++++++++++++++-
5 files changed, 56 insertions(+), 20 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/387bb9a5/ci/jenkins/bin/clang-analyzer.sh
----------------------------------------------------------------------
diff --git a/ci/jenkins/bin/clang-analyzer.sh b/ci/jenkins/bin/clang-analyzer.sh
new file mode 100755
index 0000000..e39db0b
--- /dev/null
+++ b/ci/jenkins/bin/clang-analyzer.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+
+cd "${WORKSPACE}/src"
+
+autoreconf -fi
+./configure --enable-experimental-plugins
+scan-build -o /home/jenkins/clang-analyzer --html-title="ATS master branch" make -j6
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/387bb9a5/ci/jenkins/bin/in_tree.sh
----------------------------------------------------------------------
diff --git a/ci/jenkins/bin/in_tree.sh b/ci/jenkins/bin/in_tree.sh
index b157d57..0dde26f 100755
--- a/ci/jenkins/bin/in_tree.sh
+++ b/ci/jenkins/bin/in_tree.sh
@@ -16,19 +16,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-cd "${WORKSPACE}/src"
+cd "${WORKSPACE}/src_in-tree"
if test "${JOB_NAME#*type=in_tree}" != "${JOB_NAME}"; then
- ./configure \
- --enable-ccache \
- --enable-debug \
- --enable-werror \
- --enable-experimental-plugins \
- --enable-example-plugins \
- --enable-test-tools
-
- ${ATS_MAKE} -j8 V=1
+ # Just use the configure from the snapshot.sh
+ ${ATS_MAKE} -j4
${ATS_MAKE} check
- ${ATS_MAKE} distclean
+ ${ATS_MAKE} clean
fi
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/387bb9a5/ci/jenkins/bin/out_of_tree.sh
----------------------------------------------------------------------
diff --git a/ci/jenkins/bin/out_of_tree.sh b/ci/jenkins/bin/out_of_tree.sh
index cdbb041..f9e0bd7 100755
--- a/ci/jenkins/bin/out_of_tree.sh
+++ b/ci/jenkins/bin/out_of_tree.sh
@@ -16,9 +16,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-cd "${WORKSPACE}/src"
+cd "${WORKSPACE}/src_out-of-tree"
if test "${JOB_NAME#*type=out_of_tree}" != "${JOB_NAME}"; then
+ # This runs its own configure, so don't use the one from snapshot.sh
+ ${ATS_MAKE} distclean
mkdir -p BUILDS && cd BUILDS
../configure \
--enable-ccache \
@@ -28,8 +30,8 @@ if test "${JOB_NAME#*type=out_of_tree}" != "${JOB_NAME}"; then
--enable-example-plugins \
--enable-test-tools
- ${ATS_MAKE} -j8 V=1
+ ${ATS_MAKE} -j4
${ATS_MAKE} check
- ${ATS_MAKE} distclean
+ ${ATS_MAKE} clean
fi
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/387bb9a5/ci/jenkins/bin/rat.sh
----------------------------------------------------------------------
diff --git a/ci/jenkins/bin/rat.sh b/ci/jenkins/bin/rat.sh
index e223425..aa1d504 100755
--- a/ci/jenkins/bin/rat.sh
+++ b/ci/jenkins/bin/rat.sh
@@ -16,12 +16,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-cd "${WORKSPACE}/src"
+cd "${WORKSPACE}/src_rat"
if test "${JOB_NAME#*type=RAT}" != "${JOB_NAME}"; then
- ./configure
+ # Just use the configure from the snapshot.sh
${ATS_MAKE} rat | tee RAT.txt
- cp RAT.txt /home/jenkins/RAT/rat-${ATS_BRANCH}.txt
- grep 'Unknown Licenses' RAT.txt# && exit -1
- ${ATS_MAKE} distclean
+
+ mv RAT.txt /home/jenkins/RAT/rat-${ATS_BRANCH}.txt.new
+ mv /home/jenkins/RAT/rat-${ATS_BRANCH}.txt.new /home/jenkins/RAT/rat-${ATS_BRANCH}.txt
+
+ grep 'Unknown Licenses' /home/jenkins/RAT/rat-${ATS_BRANCH}.txt #&& exit -1
fi
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/387bb9a5/ci/jenkins/bin/snapshot.sh
----------------------------------------------------------------------
diff --git a/ci/jenkins/bin/snapshot.sh b/ci/jenkins/bin/snapshot.sh
index 18d502a..0594a08 100755
--- a/ci/jenkins/bin/snapshot.sh
+++ b/ci/jenkins/bin/snapshot.sh
@@ -19,8 +19,24 @@
cd "${WORKSPACE}/src"
autoreconf -fi
-./configure
+
+./configure \
+ --enable-ccache \
+ --enable-debug \
+ --enable-werror \
+ --enable-experimental-plugins \
+ --enable-example-plugins \
+ --enable-test-tools
+
${ATS_MAKE} asf-dist
+# Make an "atomic" copy of the artifact (and leave it here for the archive)
cp trafficserver-*.tar.bz2 ${ATS_SRC_HOME}/trafficserver-${ATS_BRANCH}.tar.bz2.new
mv ${ATS_SRC_HOME}/trafficserver-${ATS_BRANCH}.tar.bz2.new ${ATS_SRC_HOME}/trafficserver-${ATS_BRANCH}.tar.bz2
+
+# Duplicate the current source tree, such that we can run verifications on this
+# tree in parallel on the jenkins master.
+cd "${WORKSPACE}"
+rsync --exclude '*.tar.bz2' -av src/ src_in-tree
+rsync --exclude '*.tar.bz2' -av src/ src_out-of-tree
+rsync --exclude '*.tar.bz2' -av src/ src_rat