diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-03-14 14:39:47 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-03-14 14:39:47 +0000 |
commit | 797494cd5d6397bf6f6b8206349432d02aa8cdc2 (patch) | |
tree | 10df28f79f09195ad0fd4ca9f2468593df108fa2 /gcc/do_one | |
parent | 2011-03-13 Joel Sherrill <joel.sherrilL@OARcorp.com> (diff) | |
download | rtems-testing-797494cd5d6397bf6f6b8206349432d02aa8cdc2.tar.bz2 |
2011-03-14 Joel Sherrill <joel.sherrill@oarcorp.com>
* do_one, rundeja, test_driver: Updates and add initial support for
running Objective-C tests.
Diffstat (limited to 'gcc/do_one')
-rwxr-xr-x | gcc/do_one | 155 |
1 files changed, 129 insertions, 26 deletions
@@ -2,16 +2,18 @@ # # Execution Times (for sparc-rtems${RTEMS_VERSION}) # -# - building native - TBD -# - building binutils - 1m31.310s -# - building GDB - 1m39.318s -# - building stage1 (multilib) - 10m22.371s -# - building RTEMS (multilib + BSP) - 22m47.048s -# - building Ada (multilib) - ? -# - building Go (multilib) - ? -# - Running GCC Test Suite (sis) - 122m47.289s -# - Running ACAT (sis) - ? -# - Running Go Test Suite (sis) - ? +# - building native - ? +# - building binutils - 1m31.310s +# - building GDB - 1m39.318s +# - building stage1 (multilib) - 10m22.371s +# - building RTEMS (multilib + BSP) - 22m47.048s +# - building Objective-C (multilib) - 6m45.532s +# - building Ada (multilib) - ? +# - building Go (multilib) - ? +# - Running GCC Test Suite (sis) - 122m47.289s +# - Running Objective-C Test Suite (sis) - ? +# - Running ACAT (sis) - ? +# - Running Go Test Suite (sis) - ? # # Computer Info # Fedora 14 on Intel Core2 Duo Q6600 (4 core) @ 2.40GHz w/ 4GB RAM @@ -41,6 +43,8 @@ do_native=no do_stage1=no do_cxx=yes do_multilib=yes +# Build the Objective-C language cross compiler. +do_objc=no # Build the Ada language cross compiler. do_ada=no do_ada_multilib=yes @@ -51,6 +55,7 @@ do_gccgo=no do_rtems=no # Which test suites do we attempt run_gcctests=no +run_objctests=no run_acats=no run_gccgotests=no run_libgotests=no @@ -80,6 +85,8 @@ do_one [options] CPU BSP -d - do not clean up (delete build directories) -v - verbose -M - do NOT email test results to gcc-testresults + -O - Build Objective-C + -P - Run Objective-C Tests -o - run GCC Go tests -t - run libgo tests EOF @@ -100,7 +107,7 @@ toggle() esac } -while getopts bdDnv1cmargiotCATMG OPT +while getopts bdDnv1cmargiotCATMGOP OPT do case "$OPT" in A) do_binutils="yes" @@ -109,13 +116,14 @@ do do_cxx="yes" do_multilib="yes" do_ada="yes" - # do_gccgo="yes" - # do_gccgo_multilib="yes" + do_gccgo="yes" + do_objc="yes" do_rtems="yes" ;; d) do_cleanup=`toggle ${do_cleanup}` ;; D) do_gdb=`toggle ${do_gdb}` ;; T) run_gcctests="yes" + run_objctests="yes" run_acats="yes" run_gccgotests="yes" ;; @@ -137,6 +145,8 @@ do C) run_acats=`toggle ${run_acats}` ;; v) verbose=`toggle ${verbose}` ;; M) do_mail=`toggle ${do_mail}` ;; + O) do_objc=`toggle ${do_objc}` ;; + P) run_objctests=`toggle ${do_objc}` ;; o) run_gccgotests=`toggle ${run_gccgotests}` ;; t) run_libgotests=`toggle ${run_libgotests}` ;; *) fatal ;; @@ -197,12 +207,14 @@ if [ ${verbose} = yes ] ; then echo " C++ : " ${do_cxx} echo " Multilib : " ${do_multilib} echo "Stage 2 : " ${do_ada} + echo " Objective-C : " ${do_objc} echo " Ada : " ${do_ada} echo " Multilib : " ${do_ada_multilib} echo " GCC Go : " ${do_gccgo} echo " Multilib : " ${do_gccgo_multilib} echo "Build RTEMS : " ${do_rtems} echo "Run GCC Tests : " ${run_gcctests} + echo "Run ObjC Tests: " ${run_objctests} echo "Run ACATS : " ${run_acats} echo "Run Go Tests : " ${run_gccgotests} echo "Do libgo Tests: " ${run_libgotests} @@ -472,7 +484,6 @@ fi j_gcc() { -set -x if [ X${1} = X ] ; then echo Usage: $0 TARGET_CPU exit 1 @@ -567,26 +578,34 @@ j_rtems() *) ;; esac case ${cpu} in - m32c) RTEMS_ARGS="--disable-ada --disable-posix --disable-networking" ;; - *) RTEMS_ARGS="--enable-ada --enable-posix --enable-networking" ;; + m32c|h8300) + RTEMS_ARGS="--disable-ada --disable-posix --disable-networking" ;; + *) + RTEMS_ARGS="--enable-ada --enable-posix --enable-networking" ;; esac ${RTEMSDIR}/configure --target=${TARGET} ${ENABLE_BSP} \ ${RTEMS_ARGS} --enable-maintainer-mode --disable-tests \ --prefix=${BSP_INSTALL} && make ${MAKEJOBS} ${MAKE_ARG} && make install status=$? + cd .. if [ $status -ne 0 ] ; then - echo "Failed building RTEMS for ${cpuArg}/${bspArg}" + echo "Failed building RTEMS for ${cpuArg}/${bspArg}" + exit $status fi - cd .. - exit $status } if [ ${do_rtems} = "yes" ] ; then echo "Building RTEMS for ${cpu} ${bsp} ..." - time j_rtems ${cpu} multilib >${LOGDIR}/${cpu}-rtems-multilib.log 2>&1 || \ + time j_rtems ${cpu} multilib >${LOGDIR}/${cpu}-rtems-multilib.log 2>&1 + if [ $? -ne 0 ] ; then + echo "Failed to build RTEMS multilib for ${cpu}" exit 1 - time j_rtems ${cpu} ${bsp} >${LOGDIR}/${cpu}-rtems-${bsp}.log 2>&1 || \ + fi + time j_rtems ${cpu} ${bsp} >${LOGDIR}/${cpu}-rtems-${bsp}.log 2>&1 + if [ $? -ne 0 ] ; then + echo "Failed to build RTEMS for ${cpu}/${bsp}" exit 1 + fi test ${do_cleanup} = "yes" && rm -rf b-${cpu}-${bsp} b-${cpu}-multilib else echo Skipping RTEMS for ${cpu}/${bsp} @@ -597,7 +616,7 @@ pwd if [ ${run_gcctests} = "yes" ] ; then echo "Running GCC Tests..." cd ${BASEDIR}/b-${cpu}-gcc || exit 1 - time sh -x ${SCRIPTDIR}/gcc/rundeja ${bsp} gcc\ + time sh -x ${SCRIPTDIR}/gcc/rundeja ${bsp} gcc \ >${LOGDIR}/${cpu}-gcctests-${bsp}.log 2>&1 RDIR=${RESULTSDIR}/${TARGET}-${bsp}/`date +%Y-%m-%d-%H-%M-%S` @@ -628,6 +647,92 @@ else fi test ${do_cleanup} = "yes" && rm -rf b-${cpu}-gcc +##### Build an Objective-C compiler now that we have a cross installed +j_gccobjc() +{ + if [ X${1} = X ] ; then + echo Usage: $0 TARGET_CPU + exit 1 + fi + TARGET=${1}-rtems${RTEMS_VERSION} + + if [ ! -d ${INSTALL} ] ; then + echo ${INSTALL} does not exist + exit 1 + fi + + if [ ${verbose} = yes ] ; then + echo "Cross GCC for Objective-C ==>" `type ${TARGET}-gcc` + fi + + ${GCCDIR}/configure \ + ${GCC_EXTRA_ARGS} \ + --enable-threads=rtems --with-gnu-as --enable-multilib \ + --with-gnu-ld --disable-newlib --verbose --with-system-zlib --disable-nls \ + CFLAGS_FOR_TARGET=-B${BSP_INSTALL}/${TARGET}/${BSP_BUILT}/lib/ \ + --enable-version-specific-runtime-libs \ + --enable-languages=c,objc --target=$TARGET --prefix=$INSTALL && + make ${MAKEJOBS} && + make install + status=$? + if [ $status -ne 0 ] ; then + echo "Failed building Objective-C" + fi +} + +objc_fail="no" +if [ ${do_objc} = "yes" ] ; then + echo "Building Stage 2 cross Objective-C compiler for ${1} ..." + (cd ${BASEDIR} && \ + rm -rf b-${cpu}-objc && \ + mkdir b-${cpu}-objc && \ + cd b-${cpu}-objc && \ + time j_gccobjc ${cpu} >${LOGDIR}/${cpu}-objc.log 2>&1 && cd ..) || \ + objc_fail="yes" +else + echo Skipping Stage 2 Objective-C for ${cpu} +fi + +#### Run the Objective-C tests +if [ ${run_objctests} = "yes" -a \ + -d ${BASEDIR}/b-${cpu}-objc -a ${objc_fail} = "no" ] ; then + echo "Running Objective-C Tests..." + + cd ${BASEDIR}/b-${cpu}-gcc || exit 1 + time sh -x ${SCRIPTDIR}/gcc/rundeja ${bsp} gcc\ + >${LOGDIR}/${cpu}-gcctests-${bsp}.log 2>&1 + + #RDIR=${RESULTSDIR}/${TARGET}-${bsp}/`date +%Y-%m-%d-%H-%M-%S` + #mkdir -p ${RDIR} + #cp gcc/testsuite/gcc/gcc.log gcc/testsuite/gcc/gcc.sum ${RDIR} + #if [ -r gcc/testsuite/g++/g++.log ] ; then + # cp gcc/testsuite/g++/g++.log gcc/testsuite/g++/g++.sum ${RDIR} + #fi + + if [ ${do_mail} = "yes" ] ; then + echo Sending Objective-C test results to GCC community.. + ${GCCDIR}/contrib/test_summary -m gcc-testresults@gcc.gnu.org | sh + if [ $? -ne 0 ] ; then + echo "Failed to email Objective-C Test Results to GCC Community .. bailing" + exit 1 + fi + + echo Sending test results to RTEMS community.. + ${GCCDIR}/contrib/test_summary -o -m rtems-tooltestresults@rtems.org | sh + if [ $? -ne 0 ] ; then + echo "Failed to email Objective-C Test Results to RTEMS Community .. bailing" + exit 1 + fi + fi + cd .. || exit 1 +else + echo Skipping Objective-C Tests for ${cpu} +fi + +if [ ${do_ada} = "yes" ] ; then + test ${do_cleanup} = "yes" && rm -rf b-${cpu}-ada +fi + ##### Build an Ada compiler now that we have a cross installed j_gccada() { @@ -643,7 +748,7 @@ j_gccada() fi if [ ${verbose} = yes ] ; then - echo "Cross GCC ==>" `type ${TARGET}-gcc` + echo "Cross GCC for Ada ==>" `type ${TARGET}-gcc` fi if [ ${do_ada_multilib} = yes ] ; then @@ -665,7 +770,7 @@ j_gccada() make install status=$? if [ $status -ne 0 ] ; then - echo "Failed building Go" + echo "Failed building Ada" fi } @@ -713,7 +818,6 @@ fi ##### Build a GCC Go compiler now that we have a cross installed j_gccgo() { -set -x if [ X${1} = X ] ; then echo Usage: $0 TARGET_CPU exit 1 @@ -773,7 +877,6 @@ else fi ##### Do the gccgo tests -set -x if [ $a ${run_gccgotests} = "yes" -a \ -d ${BASEDIR}/b-${cpu}-go -a ${go_fail} = "no" ] ; then echo "Running GCC Go Tests..." |