Lines Matching +full:cxx +full:- +full:test +full:- +full:suite
2 #===-- test-release.sh - Test the LLVM release candidates ------------------===#
9 #===------------------------------------------------------------------------===#
11 # Download, build, and test the release candidate for an LLVM release.
13 #===------------------------------------------------------------------------===#
15 System=`uname -s`
23 Base_url="http://llvm.org/svn/llvm-project"
46 echo "usage: `basename $0` -release X.Y.Z -rc NUM [OPTIONS]"
48 echo " -release X.Y.Z The release version to test."
49 echo " -rc NUM The pre-release candidate number."
50 echo " -final The final release candidate."
51 echo " -triple TRIPLE The target triple for this machine."
52 echo " -j NUM Number of compile jobs to run. [default: 3]"
53 echo " -build-dir DIR Directory to perform testing in. [default: pwd]"
54 echo " -no-checkout Don't checkout the sources from SVN."
55 echo " -test-debug Test the debug build. [default: no]"
56 echo " -test-asserts Test with asserts on. [default: no]"
57 echo " -no-compare-files Don't test that phase 2 and 3 files are identical."
58 echo " -use-gzip Use gzip instead of xz."
59 echo " -configure-flags FLAGS Extra flags to pass to the configure step."
60 echo " -use-autoconf Use autoconf instead of cmake"
61 echo " -svn-path DIR Use the specified DIR instead of a release."
62 echo " For example -svn-path trunk or -svn-path branches/release_37"
63 echo " -no-rt Disable check-out & build Compiler-RT"
64 echo " -no-libs Disable check-out & build libcxx/libcxxabi/libunwind"
65 echo " -no-libunwind Disable check-out & build libunwind"
66 echo " -no-test-suite Disable check-out & build test-suite"
67 echo " -no-openmp Disable check-out & build libomp"
68 echo " -lldb Enable check-out & build lldb"
69 echo " -no-lldb Disable check-out & build lldb (default)"
72 while [ $# -gt 0 ]; do
74 -release | --release )
77 Release_no_dot="`echo $1 | sed -e 's,\.,,g'`"
79 -rc | --rc | -RC | --RC )
83 -final | --final )
86 -svn-path | --svn-path )
88 Release="test"
89 Release_no_dot="test"
91 RC="`echo $ExportBranch | sed -e 's,/,_,g'`"
96 -triple | --triple )
100 -configure-flags | --configure-flags )
104 -j* )
105 NumJobs="`echo $1 | sed -e 's,-j\([0-9]*\),\1,g'`"
106 if [ -z "$NumJobs" ]; then
111 -build-dir | --build-dir | -builddir | --builddir )
115 -no-checkout | --no-checkout )
118 -test-debug | --test-debug )
121 -test-asserts | --test-asserts )
124 -no-compare-files | --no-compare-files )
127 -use-gzip | --use-gzip )
130 -use-autoconf | --use-autoconf )
133 -no-rt )
136 -no-libs )
139 -no-libunwind )
142 -no-test-suite )
145 -no-openmp )
148 -lldb )
151 -no-lldb )
154 -help | --help | -h | --h | -\? )
170 echo Skipping test-suite build when using CMake.
172 do_test_suite="export-only"
177 if [ -z "$Release" ]; then
181 if [ -z "$RC" ]; then
185 if [ -z "$ExportBranch" ]; then
188 if [ -z "$Triple" ]; then
194 if [ -z "$NumJobs" ]; then
195 NumJobs=`sysctl -n hw.activecpu 2> /dev/null || true`
197 if [ -z "$NumJobs" ]; then
198 NumJobs=`sysctl -n hw.ncpu 2> /dev/null || true`
200 if [ -z "$NumJobs" ]; then
201 NumJobs=`grep -c processor /proc/cpuinfo 2> /dev/null || true`
203 if [ -z "$NumJobs" ]; then
208 projects="llvm cfe clang-tools-extra"
210 projects="$projects compiler-rt"
219 yes|export-only)
220 projects="$projects test-suite"
232 mkdir -p $BuildDir
237 mkdir -p $LogDir
240 Package=clang+llvm-$Release
242 Package=$Package-$RC
244 Package=$Package-$Triple
247 echo -n > $LogDir/deferred_errors.log
253 echo "[${Flavor} Phase${Phase}] ${Msg}" | tee -a $LogDir/deferred_errors.log
259 if ! type -P $program > /dev/null 2>&1 ; then
298 clang-tools-extra)
301 compiler-rt|libcxx|libcxxabi|libunwind|openmp)
304 test-suite)
317 if [ -d $projsrc ]; then
318 echo "# Reusing $proj $Release-$RC sources in $projsrc"
321 echo "# Exporting $proj $Release-$RC sources to $projsrc"
322 if ! svn export -q $Base_url/$proj/$ExportBranch $projsrc ; then
340 ConfigureFlags="--enable-optimized --disable-assertions"
345 ConfigureFlags="--enable-optimized --enable-assertions"
350 ConfigureFlags="--disable-optimized --enable-assertions"
363 echo "# Configuring llvm $Release-$RC $Flavor"
366 echo "#" env CC="$c_compiler" CXX="$cxx_compiler" \
368 $ConfigureFlags --disable-timestamps $ExtraConfigureFlags \
369 2>&1 | tee $LogDir/llvm.configure-Phase$Phase-$Flavor.log
370 env CC="$c_compiler" CXX="$cxx_compiler" \
372 $ConfigureFlags --disable-timestamps $ExtraConfigureFlags \
373 2>&1 | tee $LogDir/llvm.configure-Phase$Phase-$Flavor.log
375 echo "#" env CC="$c_compiler" CXX="$cxx_compiler" \
376 cmake -G "Unix Makefiles" \
377 -DCMAKE_BUILD_TYPE=$BuildType -DLLVM_ENABLE_ASSERTIONS=$Assertions \
378 -DLLVM_CONFIGTIME="(timestamp not enabled)" \
380 2>&1 | tee $LogDir/llvm.configure-Phase$Phase-$Flavor.log
381 env CC="$c_compiler" CXX="$cxx_compiler" \
382 cmake -G "Unix Makefiles" \
383 -DCMAKE_BUILD_TYPE=$BuildType -DLLVM_ENABLE_ASSERTIONS=$Assertions \
384 -DLLVM_CONFIGTIME="(timestamp not enabled)" \
386 2>&1 | tee $LogDir/llvm.configure-Phase$Phase-$Flavor.log
399 echo "# Compiling llvm $Release-$RC $Flavor"
400 echo "# ${MAKE} -j $NumJobs VERBOSE=1"
401 ${MAKE} -j $NumJobs VERBOSE=1 \
402 2>&1 | tee $LogDir/llvm.make-Phase$Phase-$Flavor.log
404 echo "# Installing llvm $Release-$RC $Flavor"
408 2>&1 | tee $LogDir/llvm.install-Phase$Phase-$Flavor.log
418 if ! ( ${MAKE} -j $NumJobs -k check-all \
419 2>&1 | tee $LogDir/llvm.check-Phase$Phase-$Flavor.log ) ; then
420 deferred_error $Phase $Flavor "check-all failed"
424 # In the cmake build, unit tests are run as part of check-all.
425 if ! ( ${MAKE} -k unittests 2>&1 | \
426 tee $LogDir/llvm.unittests-Phase$Phase-$Flavor.log ) ; then
435 # not necessary --- and even harmful --- for the binary packages we release.
441 for Candidate in `find $InstallPath/{bin,lib} -type f`; do
443 if rpath=`objdump -x $Candidate | grep 'RPATH'` ; then
444 rpath=`echo $rpath | sed -e's/^ *RPATH *//'`
445 if [ -n "$rpath" ]; then
446 newrpath=`echo $rpath | sed -e's/.*\(\$ORIGIN[^:]*\).*/\1/'`
447 chrpath -r $newrpath $Candidate 2>&1 > /dev/null 2>&1
458 mv llvmCore-$Release-$RC.install/usr/local $Package
464 mv $Package llvmCore-$Release-$RC.install/usr/local
471 set -e
472 set -o pipefail
491 echo " Release: $Release-$RC"
494 echo " `uname -a`"
499 cxx_compiler="$CXX"
500 llvmCore_phase1_objdir=$BuildDir/Phase1/$Flavor/llvmCore-$Release-$RC.obj
501 llvmCore_phase1_destdir=$BuildDir/Phase1/$Flavor/llvmCore-$Release-$RC.install
503 llvmCore_phase2_objdir=$BuildDir/Phase2/$Flavor/llvmCore-$Release-$RC.obj
504 llvmCore_phase2_destdir=$BuildDir/Phase2/$Flavor/llvmCore-$Release-$RC.install
506 llvmCore_phase3_objdir=$BuildDir/Phase3/$Flavor/llvmCore-$Release-$RC.obj
507 llvmCore_phase3_destdir=$BuildDir/Phase3/$Flavor/llvmCore-$Release-$RC.install
509 rm -rf $llvmCore_phase1_objdir
510 rm -rf $llvmCore_phase1_destdir
512 rm -rf $llvmCore_phase2_objdir
513 rm -rf $llvmCore_phase2_destdir
515 rm -rf $llvmCore_phase3_objdir
516 rm -rf $llvmCore_phase3_destdir
518 mkdir -p $llvmCore_phase1_objdir
519 mkdir -p $llvmCore_phase1_destdir
521 mkdir -p $llvmCore_phase2_objdir
522 mkdir -p $llvmCore_phase2_destdir
524 mkdir -p $llvmCore_phase3_objdir
525 mkdir -p $llvmCore_phase3_destdir
556 # Testing: Test phase 3
557 echo "# Testing - built with clang"
566 for p2 in `find $llvmCore_phase2_objdir -name '*.o'` ; do
567 p3=`echo $p2 | sed -e 's,Phase2,Phase3,'`
571 if ! cmp -s \
572 <(env LC_CTYPE=C sed -e 's,Phase2,Phase3,g' $p2) \
573 <(env LC_CTYPE=C sed -e '' $p3) 16 16; then
580 ) 2>&1 | tee $LogDir/testing.$Release-$RC.log
596 if [ -s "$LogDir/deferred_errors.log" ]; then