Skip to content

Commit

Permalink
Restores the expected non-tab indentations
Browse files Browse the repository at this point in the history
  • Loading branch information
zwoop committed May 17, 2018
1 parent d6e75e8 commit 626ad19
Show file tree
Hide file tree
Showing 11 changed files with 121 additions and 117 deletions.
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,13 @@ charset = utf-8
[{*.pm,*.pl}]
indent_size = 4
charset = utf-8
# Shell scripts
[*.sh]
indent_size = 4
# Makefile's
[*.am]
trim_trailing_whitespace = false
indent_style = tab
[*.rst]
max_line_length = 80
indent_size = 3
30 changes: 15 additions & 15 deletions ci/jenkins/bin/autest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ set -x
# Configure
autoreconf -if
./configure --prefix="${INSTALL}" \
--with-user=jenkins \
--enable-experimental-plugins \
--enable-example-plugins \
${CCACHE} \
${WCCP} \
${WERROR} \
${DEBUG}
--with-user=jenkins \
--enable-experimental-plugins \
--enable-example-plugins \
${CCACHE} \
${WCCP} \
${WERROR} \
${DEBUG}

# Build and run regressions
${ATS_MAKE} -j4 && ${ATS_MAKE} install
Expand All @@ -82,15 +82,15 @@ date
cd /var/tmp # To be safer
chmod -R a+r ${SANDBOX}
if [ "0" != "$status" ]; then
if [ -d "$SANDBOX" ]; then
find "$SANDBOX" -name \*.db -exec rm {} \;
mv "$SANDBOX" /CA/autest
echo "Sandbox is available at ${URL}/${AUSB}/"
fi
exit -1
if [ -d "$SANDBOX" ]; then
find "$SANDBOX" -name \*.db -exec rm {} \;
mv "$SANDBOX" /CA/autest
echo "Sandbox is available at ${URL}/${AUSB}/"
fi
exit -1
else
[ -d "$SANDBOX" ] && rmdir "$SANDBOX"
exit 0
[ -d "$SANDBOX" ] && rmdir "$SANDBOX"
exit 0
fi

set -x
14 changes: 7 additions & 7 deletions ci/jenkins/bin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ mkdir -p BUILDS && cd BUILDS
set -x

../configure \
--prefix="${WORKSPACE}/${BUILD_NUMBER}/install" \
--enable-experimental-plugins \
--enable-example-plugins \
--with-user=jenkins \
${CCACHE} \
${WERROR} \
${DEBUG}
--prefix="${WORKSPACE}/${BUILD_NUMBER}/install" \
--enable-experimental-plugins \
--enable-example-plugins \
--with-user=jenkins \
${CCACHE} \
${WERROR} \
${DEBUG}

${ATS_MAKE} ${ATS_MAKE_FLAGS} V=1 Q=
34 changes: 17 additions & 17 deletions ci/jenkins/bin/clang-analyzer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,18 @@ output="/tmp"

# Find a Jenkins output tree if possible
if [ "${JOB_NAME#*-github}" != "${JOB_NAME}" ]; then
# This is a Github PR build, override the branch name accordingly
ATS_BRANCH="github"
if [ -w "${OUTPUT_BASE}/${ATS_BRANCH}" ]; then
output="${OUTPUT_BASE}/${ATS_BRANCH}/${ghprbPullId}"
[ ! -d "${output}"] && mkdir "${output}"
fi
github_pr=" PR #${ghprbPullId}"
results_url="https://ci.trafficserver.apache.org/clang-analyzer/${ATS_BRANCH}/${ghprbPullId}/"
# This is a Github PR build, override the branch name accordingly
ATS_BRANCH="github"
if [ -w "${OUTPUT_BASE}/${ATS_BRANCH}" ]; then
output="${OUTPUT_BASE}/${ATS_BRANCH}/${ghprbPullId}"
[ ! -d "${output}"] && mkdir "${output}"
fi
github_pr=" PR #${ghprbPullId}"
results_url="https://ci.trafficserver.apache.org/clang-analyzer/${ATS_BRANCH}/${ghprbPullId}/"
else
test -w "${OUTPUT_BASE}/${ATS_BRANCH}" && output="${OUTPUT_BASE}/${ATS_BRANCH}"
github_pr=""
results_url="https://ci.trafficserver.apache.org/clang-analyzer/${ATS_BRANCH}/"
test -w "${OUTPUT_BASE}/${ATS_BRANCH}" && output="${OUTPUT_BASE}/${ATS_BRANCH}"
github_pr=""
results_url="https://ci.trafficserver.apache.org/clang-analyzer/${ATS_BRANCH}/"
fi

# Tell scan-build to use clang as the underlying compiler to actually build
Expand All @@ -77,28 +77,28 @@ export CCC_CXX=${LLVM_BASE}/bin/clang++
[ "$output" != "/tmp" ] && echo "Results (if any) can be found at ${results_url}"
autoreconf -fi
${LLVM_BASE}/bin/scan-build ./configure ${configure} \
CXXFLAGS="-stdlib=libc++ -I/opt/llvm/include/c++/v1 -std=c++17" \
LDFLAGS="-L/opt/llvm/lib64 -Wl,-rpath=/opt/llvm/lib64"
CXXFLAGS="-stdlib=libc++ -I/opt/llvm/include/c++/v1 -std=c++17" \
LDFLAGS="-L/opt/llvm/lib64 -Wl,-rpath=/opt/llvm/lib64"

# Since we don't want the analyzer to look at LuaJIT, build it first
# without scan-build. The subsequent make will then skip it.
${ATS_MAKE} -j $NPROCS -C lib all-local V=1 Q=

${LLVM_BASE}/bin/scan-build ${checkers} ${options} -o ${output} \
--html-title="clang-analyzer: ${ATS_BRANCH}${github_pr}" \
${ATS_MAKE} -j $NPROCS V=1 Q=
--html-title="clang-analyzer: ${ATS_BRANCH}${github_pr}" \
${ATS_MAKE} -j $NPROCS V=1 Q=
status=$?

# Clean the work area unless NOCLEAN is set. This is jsut for debugging when you
# need to see what the generated build did.
if [ ! -z "$NOCLEAN" ]; then
${ATS_MAKE} distclean
${ATS_MAKE} distclean
fi
[ "$output" != "/tmp" ] && echo "Results (if any) can be found at ${results_url}"

# Cleanup old reports, for main clang and github as well (if the local helper script is available)
if [ -x "/admin/bin/clean-clang.sh" ]; then
/admin/bin/clean-clang.sh
/admin/bin/clean-clang.sh
fi

# Exit with the scan-build exit code (thanks to --status-bugs)
Expand Down
66 changes: 33 additions & 33 deletions ci/jenkins/bin/environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,41 +60,41 @@ echo "Branch is $ATS_BRANCH"
test "${JOB_NAME#*compiler=clang}" != "${JOB_NAME}" && enable_clang=1

if [ "1" == "$enable_clang" ]; then
if [ -x "/usr/local/bin/clang++50" ]; then
# For FreeBSD
export CC="/usr/local/bin/clang50"
export CXX="/usr/local/bin/clang++50"
elif [ -x "/usr/bin/clang++-5.0" ]; then
# For Ubuntu 17.x
export CC="/usr/bin/clang-5.0"
export CXX="/usr/bin/clang++-5.0"
else
export CC="clang"
export CXX="clang++"
fi
export CXXFLAGS="-Qunused-arguments"
export WITH_LIBCPLUSPLUS="yes"
if [ -x "/usr/local/bin/clang++50" ]; then
# For FreeBSD
export CC="/usr/local/bin/clang50"
export CXX="/usr/local/bin/clang++50"
elif [ -x "/usr/bin/clang++-5.0" ]; then
# For Ubuntu 17.x
export CC="/usr/bin/clang-5.0"
export CXX="/usr/bin/clang++-5.0"
else
export CC="clang"
export CXX="clang++"
fi
export CXXFLAGS="-Qunused-arguments"
export WITH_LIBCPLUSPLUS="yes"
elif [ "1" == "$enable_icc" ]; then
source /opt/rh/devtoolset-7/enable
source /opt/intel/bin/iccvars.sh intel64
export CC=icc
export CXX=icpc
source /opt/rh/devtoolset-7/enable
source /opt/intel/bin/iccvars.sh intel64
export CC=icc
export CXX=icpc
else
# Default is gcc / g++
export CC=gcc
export CXX=g++
# Only test for non standard compilers on ATS v7.x and later. ToDo: Remove this when 6.x is EOLifed.
if test "$ATS_IS_7" == "yes"; then
if test -f "/opt/rh/devtoolset-7/enable"; then
# This changes the path such that gcc / g++ is the right version. This is for CentOS 6 / 7.
source /opt/rh/devtoolset-7/enable
echo "Enabling devtoolset-7"
elif test -x "/usr/bin/g++-7"; then
# This is for Debian platforms
export CC=/usr/bin/gcc-7
export CXX=/usr/bin/g++-7
fi
fi
# Default is gcc / g++
export CC=gcc
export CXX=g++
# Only test for non standard compilers on ATS v7.x and later. ToDo: Remove this when 6.x is EOLifed.
if test "$ATS_IS_7" == "yes"; then
if test -f "/opt/rh/devtoolset-7/enable"; then
# This changes the path such that gcc / g++ is the right version. This is for CentOS 6 / 7.
source /opt/rh/devtoolset-7/enable
echo "Enabling devtoolset-7"
elif test -x "/usr/bin/g++-7"; then
# This is for Debian platforms
export CC=/usr/bin/gcc-7
export CXX=/usr/bin/g++-7
fi
fi
fi

# Echo out compiler information
Expand Down
14 changes: 7 additions & 7 deletions ci/jenkins/bin/github.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ set -x
autoreconf -if

./configure --prefix="${INSTALL}" \
--with-user=jenkins \
--enable-experimental-plugins \
--enable-example-plugins \
${CCACHE} \
${WCCP} \
${WERROR} \
${DEBUG}
--with-user=jenkins \
--enable-experimental-plugins \
--enable-example-plugins \
${CCACHE} \
${WCCP} \
${WERROR} \
${DEBUG}

# Build and run regressions
${ATS_MAKE} ${ATS_MAKE_FLAGS} V=1 Q=
Expand Down
12 changes: 6 additions & 6 deletions ci/jenkins/bin/in_tree.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ cd "${WORKSPACE}/src"

autoreconf -fi
./configure \
--with-user=jenkins \
--enable-ccache \
--enable-werror \
--enable-experimental-plugins \
--enable-example-plugins \
--enable-wccp
--with-user=jenkins \
--enable-ccache \
--enable-werror \
--enable-experimental-plugins \
--enable-example-plugins \
--enable-wccp

${ATS_MAKE} -j5 V=1
#${ATS_MAKE} check VERBOSE=Y
Expand Down
12 changes: 6 additions & 6 deletions ci/jenkins/bin/out_of_tree.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ cd "${WORKSPACE}/src"
autoreconf -fi
mkdir -p BUILDS && cd BUILDS
../configure \
--with-user=jenkins \
--enable-ccache \
--enable-werror \
--enable-experimental-plugins \
--enable-example-plugins \
--enable-wccp
--with-user=jenkins \
--enable-ccache \
--enable-werror \
--enable-experimental-plugins \
--enable-example-plugins \
--enable-wccp

${ATS_MAKE} -j5 V=1
#${ATS_MAKE} check VERBOSE=Y
Expand Down
12 changes: 6 additions & 6 deletions ci/jenkins/bin/snapshot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ cd "${WORKSPACE}/src"
autoreconf -fi

./configure \
--with-user=jenkins \
--enable-ccache \
--enable-debug \
--enable-werror \
--enable-experimental-plugins \
--enable-example-plugins
--with-user=jenkins \
--enable-ccache \
--enable-debug \
--enable-werror \
--enable-experimental-plugins \
--enable-example-plugins

${ATS_MAKE} asf-dist

Expand Down
22 changes: 11 additions & 11 deletions ci/jenkins/git-jenkins-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,23 @@ set -e # exit on error
MASTER=trafficserver

branch() {
local dname="$1" # directory name
local bname="$2" # branch name
local dname="$1" # directory name
local bname="$2" # branch name

git clone --local $MASTER ${dname}
( cd ${dname} && git checkout -b ${bname} origin/${bname})
git clone --local $MASTER ${dname}
(cd ${dname} && git checkout -b ${bname} origin/${bname})
}

if [ ! -d $MASTER ] ; then
git clone https://git-wip-us.apache.org/repos/asf/trafficserver.git $MASTER
if [ ! -d $MASTER ]; then
git clone https://git-wip-us.apache.org/repos/asf/trafficserver.git $MASTER
fi

(
cd $MASTER
for branch in $(git branch -r | egrep 'origin/[0-9.x]+') ; do
git checkout -b $(echo $branch | sed -es'|origin/||') $branch
git checkout master
done
cd $MASTER
for branch in $(git branch -r | egrep 'origin/[0-9.x]+'); do
git checkout -b $(echo $branch | sed -es'|origin/||') $branch
git checkout master
done
)

# The directory names corresponsing to the branches should match the names
Expand Down
18 changes: 9 additions & 9 deletions ci/jenkins/git-jenkins-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@ set -e # exit on error
MASTER=trafficserver

(
cd trafficserver
cd trafficserver

# Pick up any new release branches ...
for branch in $(git branch -r | egrep 'origin/[0-9.x]+') ; do
git checkout -b $(echo $branch | sed -es'|origin/||') $branch || true
git checkout master
done
# Pick up any new release branches ...
for branch in $(git branch -r | egrep 'origin/[0-9.x]+'); do
git checkout -b $(echo $branch | sed -es'|origin/||') $branch || true
git checkout master
done

git pull --all --verbose
git pull --all --verbose
)

for repo in /Users/jenkins/git/trafficserver* ; do
( cd $repo && git pull )
for repo in /Users/jenkins/git/trafficserver*; do
(cd $repo && git pull)
done

# vim: set sw=2 ts=2 sw=2 :

0 comments on commit 626ad19

Please sign in to comment.