[zorg] r351994 - [jenkins] make the DWARF version configurable
Adrian Prantl via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 23 15:09:22 PST 2019
Author: adrian
Date: Wed Jan 23 15:09:21 2019
New Revision: 351994
URL: http://llvm.org/viewvc/llvm-project?rev=351994&view=rev
Log:
[jenkins] make the DWARF version configurable
Added:
zorg/trunk/zorg/jenkins/lldb-cmake-matrix-dwarf.sh
- copied, changed from r351986, zorg/trunk/zorg/jenkins/lldb-cmake-matrix-dwarf5.sh
Removed:
zorg/trunk/zorg/jenkins/lldb-cmake-matrix-dwarf5.sh
Modified:
zorg/trunk/zorg/jenkins/jobs/jobs/lldb-cmake-matrix
Modified: zorg/trunk/zorg/jenkins/jobs/jobs/lldb-cmake-matrix
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/jenkins/jobs/jobs/lldb-cmake-matrix?rev=351994&r1=351993&r2=351994&view=diff
==============================================================================
--- zorg/trunk/zorg/jenkins/jobs/jobs/lldb-cmake-matrix (original)
+++ zorg/trunk/zorg/jenkins/jobs/jobs/lldb-cmake-matrix Wed Jan 23 15:09:21 2019
@@ -26,22 +26,17 @@ pipeline {
steps {
timeout(activity: true, time: 30) {
sh '''
-set -u
-
-if [ "$CLEAN" = true ] ; then
- rm -rf llvm
-fi
-
-export
-python $SCRIPT_PATH/build.py fetch
-'''
+ set -u
+ export
+ python $SCRIPT_PATH/build.py fetch
+ '''
sh '''
-bash $SCRIPT_PATH/lldb-cmake-matrix-stage1.sh
-'''
+ bash $SCRIPT_PATH/lldb-cmake-matrix-stage1.sh
+ '''
}
}
}
- stage('Test against Clang 5.0.2') {
+ stage('Clang 5.0.2') {
steps {
timeout(activity: true, time: 30) {
checkout([$class: 'SubversionSCM',
@@ -57,14 +52,14 @@ bash $SCRIPT_PATH/lldb-cmake-matrix-stag
}
timeout(activity: true, time: 30) {
sh '''
-export HISTORIC_COMPILER=clang-5.0.2
-bash ${SCRIPT_PATH}/lldb-cmake-matrix-stage2.sh
-'''
+ export HISTORIC_COMPILER=clang-5.0.2
+ bash ${SCRIPT_PATH}/lldb-cmake-matrix-stage2.sh
+ '''
junit 'test-clang-5.0.2/results.xml'
}
}
}
- stage('Test against Clang 6.0.1') {
+ stage('Clang 6.0.1') {
steps {
timeout(activity: true, time: 30) {
checkout([$class: 'SubversionSCM',
@@ -80,14 +75,14 @@ bash ${SCRIPT_PATH}/lldb-cmake-matrix-st
}
timeout(activity: true, time: 30) {
sh '''
-export HISTORIC_COMPILER=clang-6.0.1
-bash ${SCRIPT_PATH}/lldb-cmake-matrix-stage2.sh
-'''
+ export HISTORIC_COMPILER=clang-6.0.1
+ bash ${SCRIPT_PATH}/lldb-cmake-matrix-stage2.sh
+ '''
junit 'test-clang-6.0.1/results.xml'
}
}
}
- stage('Run tests against Clang 7.0.1') {
+ stage('Clang 7.0.1') {
steps {
timeout(activity: true, time: 30) {
checkout([$class: 'SubversionSCM',
@@ -103,19 +98,42 @@ bash ${SCRIPT_PATH}/lldb-cmake-matrix-st
}
timeout(activity: true, time: 30) {
sh '''
-export HISTORIC_COMPILER=clang-7.0.1
-bash ${SCRIPT_PATH}/lldb-cmake-matrix-stage2.sh
-'''
+ export HISTORIC_COMPILER=clang-7.0.1
+ bash ${SCRIPT_PATH}/lldb-cmake-matrix-stage2.sh
+ '''
junit 'test-clang-7.0.1/results.xml'
}
}
}
- stage('Test against Upstream Clang + DWARF 5') {
+ stage('Upstream Clang + DWARF 2') {
steps {
timeout(activity: true, time: 30) {
sh '''
-bash ${SCRIPT_PATH}/lldb-cmake-matrix-dwarf5.sh
-'''
+ export DWARF_VERSION=2
+ bash ${SCRIPT_PATH}/lldb-cmake-matrix-dwarf.sh
+ '''
+ junit 'test-dwarf2/results.xml'
+ }
+ }
+ }
+ stage('Upstream Clang + DWARF 4') {
+ steps {
+ timeout(activity: true, time: 30) {
+ sh '''
+ export DWARF_VERSION=4
+ bash ${SCRIPT_PATH}/lldb-cmake-matrix-dwarf.sh
+ '''
+ junit 'test-dwarf4/results.xml'
+ }
+ }
+ }
+ stage('Upstream Clang + DWARF 5') {
+ steps {
+ timeout(activity: true, time: 30) {
+ sh '''
+ export DWARF_VERSION=5
+ bash ${SCRIPT_PATH}/lldb-cmake-matrix-dwarf.sh
+ '''
junit 'test-dwarf5/results.xml'
}
}
Copied: zorg/trunk/zorg/jenkins/lldb-cmake-matrix-dwarf.sh (from r351986, zorg/trunk/zorg/jenkins/lldb-cmake-matrix-dwarf5.sh)
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/jenkins/lldb-cmake-matrix-dwarf.sh?p2=zorg/trunk/zorg/jenkins/lldb-cmake-matrix-dwarf.sh&p1=zorg/trunk/zorg/jenkins/lldb-cmake-matrix-dwarf5.sh&r1=351986&r2=351994&rev=351994&view=diff
==============================================================================
--- zorg/trunk/zorg/jenkins/lldb-cmake-matrix-dwarf5.sh (original)
+++ zorg/trunk/zorg/jenkins/lldb-cmake-matrix-dwarf.sh Wed Jan 23 15:09:21 2019
@@ -8,11 +8,16 @@ if [ -z "WORKSPACE" ]; then
exit 1
fi
+if [ -z "DWARF_VERSION" ]; then
+ echo "DWARF_VERSION is not set."
+ exit 1
+fi
+
SRC="$WORKSPACE/src"
BASE_BUILD="$WORKSPACE/lldb-build"
-BUILD="$WORKSPACE/lldb-build-dwarf5"
-TEST="$WORKSPACE/test-dwarf5"
-RESULTS="$WORKSPACE/results-dwarf5"
+BUILD="$WORKSPACE/lldb-build-dwarf${DWARF_VERSION}"
+TEST="$WORKSPACE/test-dwarf${DWARF_VERSION}"
+RESULTS="$WORKSPACE/results-dwarf${DWARF_VERSION}"
DEST="$RESULTS/lldb"
LLVM_SRC="$SRC/llvm"
@@ -63,21 +68,21 @@ echo "@@@ Setup @@@"
echo "@@@@@@"
set +x
-echo "@@@ Environment for DWARF 5 @@@"
+echo "@@@ Environment for DWARF ${DWARF_VERSION} @@@"
env | sort
echo "@@@@@@"
set -eux
python $SCRIPT_PATH/build.py derive-lldb-cmake
-echo "@@@ CMake test suite for DWARF 5 @@@"
+echo "@@@ CMake test suite for DWARF ${DWARF_VERSION} @@@"
rsync -av --delete $BASE_BUILD/bin $BUILD/
-WRAPPER=$BUILD/bin/clang-dwarf5
+WRAPPER=$BUILD/bin/clang-dwarf${DWARF_VERSION}
echo '#!/bin/sh'>${WRAPPER}
echo '#!/bin/sh'>${WRAPPER}++
-echo $BASE_BUILD'/bin/clang -gdwarf-5 $*'>>${WRAPPER}
-echo $BASE_BUILD'/bin/clang++ -gdwarf-5 $*'>>${WRAPPER}++
+echo ${BASE_BUILD}/bin/clang -gdwarf-${DWARF_VERSION} '$*'>>${WRAPPER}
+echo ${BASE_BUILD}/bin/clang++ -gdwarf-${DWARF_VERSION} '$*'>>${WRAPPER}++
chmod u+x ${WRAPPER} ${WRAPPER}++
cmake $WORKSPACE/llvm \
@@ -97,7 +102,7 @@ cmake $WORKSPACE/llvm \
echo "@@@@@@"
-echo "@@@ Running tests using DWARF 5 @@@"
+echo "@@@ Running tests using DWARF ${DWARF_VERSION} @@@"
set +e
# FIXME: The LIT tests don't pick the right compiler yet.
env PYTHONPATH=/usr/local/lib/python2.7/site-packages \
@@ -108,7 +113,7 @@ set -e
echo "@@@@@@"
-echo "@@@ Archiving test logs from DWARF 5 @@@"
+echo "@@@ Archiving test logs from DWARF ${DWARF_VERSION} @@@"
tar zcf "$RESULTS/test_logs.tgz" -C "${LOGS_DIR}" .
if [ $EXIT_STATUS -ne 0 ]; then
Removed: zorg/trunk/zorg/jenkins/lldb-cmake-matrix-dwarf5.sh
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/jenkins/lldb-cmake-matrix-dwarf5.sh?rev=351993&view=auto
==============================================================================
--- zorg/trunk/zorg/jenkins/lldb-cmake-matrix-dwarf5.sh (original)
+++ zorg/trunk/zorg/jenkins/lldb-cmake-matrix-dwarf5.sh (removed)
@@ -1,122 +0,0 @@
-set -eux
-
-# Avoid the python in /usr/local/bin.
-PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/jbin
-
-if [ -z "WORKSPACE" ]; then
- echo "WORKSPACE is not set."
- exit 1
-fi
-
-SRC="$WORKSPACE/src"
-BASE_BUILD="$WORKSPACE/lldb-build"
-BUILD="$WORKSPACE/lldb-build-dwarf5"
-TEST="$WORKSPACE/test-dwarf5"
-RESULTS="$WORKSPACE/results-dwarf5"
-DEST="$RESULTS/lldb"
-
-LLVM_SRC="$SRC/llvm"
-LLDB_SRC="$SRC/llvm/tools/lldb"
-TESTCASES_DIR="$LLDB_SRC/test/testcases"
-LOGS_DIR="$TEST/logs"
-RESULTS_FILE="$TEST/results.xml"
-
-CC="$WORKSPACE/host-compiler/bin/clang"
-CXX="$WORKSPACE/host-compiler/bin/clang++"
-
-TOOLS="clang lldb"
-PROJECTS=""
-
-
-echo "@@@ Clean @@@"
-
-CLEAN_DIRS="$TEST $LOGS_DIR $RESULTS $BUILD/lldb-test-build.noindex"
-
-if [ "$CLEAN" = "true" ]; then
- CLEAN_DIRS="$BUILD $CLEAN_DIRS"
-fi
-
-for dir in $CLEAN_DIRS; do
- if [ -d $dir ]; then
- rm -rf $dir
- fi
- mkdir -p $dir
-done
-
-MODULE_CACHE=$(xcrun clang -fmodules -x c - -o /dev/null '-###' 2>&1 | grep -Eo '\\-fmodules-cache-path=[^"]+' | cut -d'=' -f2)
-if [ -d $MODULE_CACHE ]; then
- rm -rf $MODULE_CACHE
-fi
-rm -rf $BUILD/module.cache
-
-rm -f $WORKSPACE/*.tgz
-
-echo "@@@@@@"
-
-mkdir -p $BUILD
-cd $BUILD
-
-echo "@@@ Setup @@@"
-
-{ /usr/local/bin/lldbsign unlock; } 2>/dev/null
-
-echo "@@@@@@"
-
-set +x
-echo "@@@ Environment for DWARF 5 @@@"
-env | sort
-echo "@@@@@@"
-set -eux
-
-python $SCRIPT_PATH/build.py derive-lldb-cmake
-
-echo "@@@ CMake test suite for DWARF 5 @@@"
-rsync -av --delete $BASE_BUILD/bin $BUILD/
-
-WRAPPER=$BUILD/bin/clang-dwarf5
-echo '#!/bin/sh'>${WRAPPER}
-echo '#!/bin/sh'>${WRAPPER}++
-echo $BASE_BUILD'/bin/clang -gdwarf-5 $*'>>${WRAPPER}
-echo $BASE_BUILD'/bin/clang++ -gdwarf-5 $*'>>${WRAPPER}++
-chmod u+x ${WRAPPER} ${WRAPPER}++
-
-cmake $WORKSPACE/llvm \
- -DCMAKE_BUILD_TYPE=Release \
- -DLLVM_ENABLE_ASSERTIONS=On \
- -DLLVM_ENABLE_MODULES=On \
- -DLLVM_VERSION_PATCH=99 \
- -DLLVM_TARGETS_TO_BUILD='X86' \
- -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
- -DCMAKE_INSTALL_PREFIX="$DEST" \
- -G Ninja \
- -DLLDB_TEST_C_COMPILER="${WRAPPER}" \
- -DLLDB_TEST_CXX_COMPILER="${WRAPPER}++" \
- -DLLDB_TEST_USER_ARGS="--framework;$BASE_BUILD/bin/LLDB.framework;--executable;$BASE_BUILD/bin/lldb;--skip-category;gmodules;--arch=x86_64;--build-dir;$BUILD;-s=$LOGS_DIR;--env;TERM=vt100;" \
- -DLLVM_LIT_ARGS="--xunit-xml-output=$RESULTS_FILE -v"
-
-echo "@@@@@@"
-
-
-echo "@@@ Running tests using DWARF 5 @@@"
-set +e
-# FIXME: The LIT tests don't pick the right compiler yet.
-env PYTHONPATH=/usr/local/lib/python2.7/site-packages \
- python $BUILD/bin/llvm-lit --xunit-xml-output=$RESULTS_FILE \
- -v $WORKSPACE/llvm/tools/lldb/lit --filter=lldb-Suite --timeout 600
-EXIT_STATUS=$?
-set -e
-echo "@@@@@@"
-
-
-echo "@@@ Archiving test logs from DWARF 5 @@@"
-tar zcf "$RESULTS/test_logs.tgz" -C "${LOGS_DIR}" .
-
-if [ $EXIT_STATUS -ne 0 ]; then
- echo "CHECK-LLDB Failed!\n"
- # Exit with zero if only LIT failed.
- # The junit plugin will turn the build yellow.
- # exit 1
-fi
-
-# Delete directories that would get deleted first thing by the next build anyway.
-rm -rf $BUILD/lldb-test-build.noindex $BUILD/module.cache
More information about the llvm-commits
mailing list