Skip to content

Commit

Permalink
[Release] Allow release testers to disable certain components
Browse files Browse the repository at this point in the history
Not all components build correctly on all targets and the release
script had no way to disable them other than editing the script locally.

This change provides a way to disable the test-suite, compiler-rt and
the libraries, as well as allowing you to re-run on the same directory
without checking out all sources again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242919 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
rengolin committed Jul 22, 2015
1 parent 03c5b60 commit c6f36fe
Showing 1 changed file with 36 additions and 7 deletions.
43 changes: 36 additions & 7 deletions utils/release/test-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ else
MAKE=make
fi

projects="llvm cfe compiler-rt libcxx libcxxabi test-suite clang-tools-extra libunwind"

# Base SVN URL for the sources.
Base_url="http://llvm.org/svn/llvm-project"

Expand All @@ -32,6 +30,9 @@ do_checkout="yes"
do_debug="no"
do_asserts="no"
do_compare="yes"
do_rt="yes"
do_libs="yes"
do_test_suite="yes"
BuildDir="`pwd`"
use_autoconf="no"
ExtraConfigureFlags=""
Expand All @@ -55,6 +56,9 @@ function usage() {
echo " -use-autoconf Use autoconf instead of cmake"
echo " -svn-path DIR Use the specified DIR instead of a release."
echo " For example -svn-path trunk or -svn-path branches/release_37"
echo " -no-rt Disable check-out & build Compiler-RT"
echo " -no-libs Disable check-out & build libcxx/libcxxabi/libunwind"
echo " -no-test-suite Disable check-out & build test-suite"
}

if [ `uname -s` = "Darwin" ]; then
Expand Down Expand Up @@ -123,6 +127,15 @@ while [ $# -gt 0 ]; do
-use-autoconf | --use-autoconf )
use_autoconf="yes"
;;
-no-rt )
do_rt="no"
;;
-no-libs )
do_libs="no"
;;
-no-test-suite )
do_test_suite="no"
;;
-help | --help | -h | --h | -\? )
usage
exit 0
Expand Down Expand Up @@ -167,6 +180,18 @@ if [ -z "$NumJobs" ]; then
NumJobs=3
fi

# Projects list
projects="llvm cfe clang-tools-extra"
if [ $do_rt = "yes" ]; then
projects="$projects compiler-rt"
fi
if [ $do_libs = "yes" ]; then
projects="$projects libcxx libcxxabi libunwind"
fi
if [ $do_test_suite = "yes" ]; then
projects="$projects test-suite"
fi

# Go to the build directory (may be different from CWD)
BuildDir=$BuildDir/$RC
mkdir -p $BuildDir
Expand Down Expand Up @@ -215,6 +240,10 @@ function export_sources() {
check_valid_urls

for proj in $projects ; do
if [ -d $proj.src ]; then
echo "# Reusing $proj $Release-$RC sources"
continue
fi
echo "# Exporting $proj $Release-$RC sources"
if ! svn export -q $Base_url/$proj/$ExportBranch $proj.src ; then
echo "error: failed to export $proj project"
Expand All @@ -232,19 +261,19 @@ function export_sources() {
ln -s ../../../../clang-tools-extra.src extra
fi
cd $BuildDir/llvm.src/projects
if [ ! -h test-suite ]; then
if [ -d $BuildDir/test-suite.src ] && [ ! -h test-suite ]; then
ln -s ../../test-suite.src test-suite
fi
if [ ! -h compiler-rt ]; then
if [ -d $BuildDir/compiler-rt.src ] && [ ! -h compiler-rt ]; then
ln -s ../../compiler-rt.src compiler-rt
fi
if [ ! -h libcxx ]; then
if [ -d $BuildDir/libcxx.src ] && [ ! -h libcxx ]; then
ln -s ../../libcxx.src libcxx
fi
if [ ! -h libcxxabi ]; then
if [ -d $BuildDir/libcxxabi.src ] && [ ! -h libcxxabi ]; then
ln -s ../../libcxxabi.src libcxxabi
fi
if [ ! -h libunwind ]; then
if [ -d $BuildDir/libunwind.src ] && [ ! -h libunwind ]; then
ln -s ../../libunwind.src libunwind
fi

Expand Down

0 comments on commit c6f36fe

Please sign in to comment.