Changeset 797494c in rtems-testing


Ignore:
Timestamp:
Mar 14, 2011, 2:39:47 PM (8 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, 8895273c193787f84c4585a10f6d6aceb3b25dc4
Children:
4124d31
Parents:
de50b14
Message:

2011-03-14 Joel Sherrill <joel.sherrill@…>

  • do_one, rundeja, test_driver: Updates and add initial support for running Objective-C tests.
Location:
gcc
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • gcc/ChangeLog

    rde50b14 r797494c  
     12011-03-14      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * do_one, rundeja, test_driver: Updates and add initial support for
     4        running Objective-C tests.
     5
    162011-02-07      Joel Sherrill <joel.sherrill@oarcorp.com>
    27
  • gcc/do_one

    rde50b14 r797494c  
    33# Execution Times (for sparc-rtems${RTEMS_VERSION})
    44#
    5 #   - building native                   - TBD
    6 #   - building binutils                 - 1m31.310s
    7 #   - building GDB                      - 1m39.318s
    8 #   - building stage1 (multilib)        - 10m22.371s
    9 #   - building RTEMS (multilib + BSP)   - 22m47.048s
    10 #   - building Ada (multilib)           - ?
    11 #   - building Go (multilib)            - ?
    12 #   - Running GCC Test Suite (sis)      - 122m47.289s
    13 #   - Running ACAT           (sis)      - ?
    14 #   - Running Go Test Suite  (sis)      - ?
     5#   - building native                      - ?
     6#   - building binutils                    - 1m31.310s
     7#   - building GDB                         - 1m39.318s
     8#   - building stage1 (multilib)           - 10m22.371s
     9#   - building RTEMS (multilib + BSP)      - 22m47.048s
     10#   - building Objective-C (multilib)      - 6m45.532s
     11#   - building Ada (multilib)              - ?
     12#   - building Go (multilib)               - ?
     13#   - Running GCC Test Suite (sis)         - 122m47.289s
     14#   - Running Objective-C Test Suite (sis) - ?
     15#   - Running ACAT           (sis)         - ?
     16#   - Running Go Test Suite  (sis)         - ?
    1517#
    1618# Computer Info
     
    4244  do_cxx=yes
    4345  do_multilib=yes
     46# Build the Objective-C language cross compiler.
     47do_objc=no
    4448# Build the Ada language cross compiler.
    4549do_ada=no
     
    5256# Which test suites do we attempt
    5357run_gcctests=no
     58run_objctests=no
    5459run_acats=no
    5560run_gccgotests=no
     
    8186  -v - verbose
    8287  -M - do NOT email test results to gcc-testresults
     88  -O - Build Objective-C
     89  -P - Run Objective-C Tests
    8390  -o - run GCC Go tests
    8491  -t - run libgo tests
     
    101108}
    102109
    103 while getopts bdDnv1cmargiotCATMG OPT
     110while getopts bdDnv1cmargiotCATMGOP OPT
    104111do
    105112    case "$OPT" in
     
    110117           do_multilib="yes"
    111118           do_ada="yes"
    112            # do_gccgo="yes"
    113            # do_gccgo_multilib="yes"
     119           do_gccgo="yes"
     120           do_objc="yes"
    114121           do_rtems="yes"
    115122           ;;
     
    117124        D) do_gdb=`toggle ${do_gdb}` ;;
    118125        T) run_gcctests="yes"
     126           run_objctests="yes"
    119127           run_acats="yes"
    120128           run_gccgotests="yes"
     
    138146        v) verbose=`toggle ${verbose}` ;;
    139147        M) do_mail=`toggle ${do_mail}` ;;
     148        O) do_objc=`toggle ${do_objc}` ;;
     149        P) run_objctests=`toggle ${do_objc}` ;;
    140150        o) run_gccgotests=`toggle ${run_gccgotests}` ;;
    141151        t) run_libgotests=`toggle ${run_libgotests}` ;;
     
    198208  echo "  Multilib    : " ${do_multilib}
    199209  echo "Stage 2       : " ${do_ada}
     210  echo "  Objective-C : " ${do_objc}
    200211  echo "  Ada         : " ${do_ada}
    201212  echo "  Multilib    : " ${do_ada_multilib}
     
    204215  echo "Build RTEMS   : " ${do_rtems}
    205216  echo "Run GCC Tests : " ${run_gcctests}
     217  echo "Run ObjC Tests: " ${run_objctests}
    206218  echo "Run ACATS     : " ${run_acats}
    207219  echo "Run Go Tests  : " ${run_gccgotests}
     
    473485{
    474486
    475 set -x
    476487  if [ X${1} = X ] ; then
    477488    echo Usage: $0 TARGET_CPU
     
    568579  esac
    569580  case ${cpu} in
    570     m32c) RTEMS_ARGS="--disable-ada --disable-posix --disable-networking" ;;
    571     *)    RTEMS_ARGS="--enable-ada --enable-posix --enable-networking" ;;
     581    m32c|h8300)
     582      RTEMS_ARGS="--disable-ada --disable-posix --disable-networking" ;;
     583    *)
     584      RTEMS_ARGS="--enable-ada --enable-posix --enable-networking" ;;
    572585  esac
    573586  ${RTEMSDIR}/configure --target=${TARGET} ${ENABLE_BSP} \
     
    575588  --prefix=${BSP_INSTALL} && make ${MAKEJOBS} ${MAKE_ARG} && make install
    576589  status=$?
     590  cd ..
    577591  if [ $status -ne 0 ] ; then
    578      echo "Failed building RTEMS for ${cpuArg}/${bspArg}"
    579   fi
    580   cd ..
    581   exit $status
     592    echo "Failed building RTEMS for ${cpuArg}/${bspArg}"
     593    exit $status
     594  fi
    582595}
    583596
    584597if [ ${do_rtems} = "yes" ] ; then
    585598  echo "Building RTEMS for ${cpu} ${bsp} ..."
    586   time j_rtems ${cpu} multilib >${LOGDIR}/${cpu}-rtems-multilib.log 2>&1 || \
    587     exit 1
    588   time j_rtems ${cpu} ${bsp} >${LOGDIR}/${cpu}-rtems-${bsp}.log 2>&1 || \
    589     exit 1
     599  time j_rtems ${cpu} multilib >${LOGDIR}/${cpu}-rtems-multilib.log 2>&1
     600  if [ $? -ne 0 ] ; then
     601    echo "Failed to build RTEMS multilib for ${cpu}"
     602    exit 1
     603  fi
     604  time j_rtems ${cpu} ${bsp} >${LOGDIR}/${cpu}-rtems-${bsp}.log 2>&1
     605  if [ $? -ne 0 ] ; then
     606    echo "Failed to build RTEMS for ${cpu}/${bsp}"
     607    exit 1
     608  fi
    590609  test ${do_cleanup} = "yes" && rm -rf b-${cpu}-${bsp} b-${cpu}-multilib
    591610else
     
    598617  echo "Running GCC Tests..."
    599618  cd ${BASEDIR}/b-${cpu}-gcc || exit 1
    600   time sh -x ${SCRIPTDIR}/gcc/rundeja ${bsp} gcc\
     619  time sh -x ${SCRIPTDIR}/gcc/rundeja ${bsp} gcc \
    601620    >${LOGDIR}/${cpu}-gcctests-${bsp}.log 2>&1
    602621
     
    629648test ${do_cleanup} = "yes" && rm -rf b-${cpu}-gcc
    630649
     650##### Build an Objective-C compiler now that we have a cross installed
     651j_gccobjc()
     652{
     653  if [ X${1} = X ] ; then
     654    echo Usage: $0 TARGET_CPU
     655    exit 1
     656  fi
     657  TARGET=${1}-rtems${RTEMS_VERSION}
     658
     659  if [ ! -d ${INSTALL} ] ; then
     660    echo ${INSTALL} does not exist
     661    exit 1
     662  fi
     663
     664  if [ ${verbose} = yes ] ; then
     665    echo "Cross GCC for Objective-C ==>" `type ${TARGET}-gcc`
     666  fi
     667
     668  ${GCCDIR}/configure \
     669   ${GCC_EXTRA_ARGS} \
     670   --enable-threads=rtems  --with-gnu-as  --enable-multilib \
     671   --with-gnu-ld --disable-newlib  --verbose --with-system-zlib --disable-nls \
     672    CFLAGS_FOR_TARGET=-B${BSP_INSTALL}/${TARGET}/${BSP_BUILT}/lib/ \
     673    --enable-version-specific-runtime-libs \
     674    --enable-languages=c,objc --target=$TARGET --prefix=$INSTALL &&
     675  make ${MAKEJOBS} &&
     676  make install
     677  status=$?
     678  if [ $status -ne 0 ] ; then
     679    echo "Failed building Objective-C"
     680  fi
     681}
     682
     683objc_fail="no"
     684if [ ${do_objc} = "yes" ] ; then
     685  echo "Building Stage 2 cross Objective-C compiler for ${1} ..."
     686  (cd ${BASEDIR} && \
     687   rm -rf b-${cpu}-objc && \
     688   mkdir  b-${cpu}-objc && \
     689   cd b-${cpu}-objc && \
     690   time j_gccobjc ${cpu} >${LOGDIR}/${cpu}-objc.log 2>&1 && cd ..) || \
     691    objc_fail="yes"
     692else
     693  echo Skipping Stage 2 Objective-C for ${cpu}
     694fi
     695
     696#### Run the Objective-C tests
     697if [ ${run_objctests} = "yes" -a \
     698     -d ${BASEDIR}/b-${cpu}-objc -a ${objc_fail} = "no" ] ; then
     699  echo "Running Objective-C Tests..."
     700
     701  cd ${BASEDIR}/b-${cpu}-gcc || exit 1
     702  time sh -x ${SCRIPTDIR}/gcc/rundeja ${bsp} gcc\
     703    >${LOGDIR}/${cpu}-gcctests-${bsp}.log 2>&1
     704
     705  #RDIR=${RESULTSDIR}/${TARGET}-${bsp}/`date +%Y-%m-%d-%H-%M-%S`
     706  #mkdir -p ${RDIR}
     707  #cp gcc/testsuite/gcc/gcc.log gcc/testsuite/gcc/gcc.sum ${RDIR}
     708  #if [ -r gcc/testsuite/g++/g++.log ] ; then
     709  #  cp gcc/testsuite/g++/g++.log gcc/testsuite/g++/g++.sum ${RDIR}
     710  #fi
     711
     712  if [ ${do_mail} = "yes" ] ; then
     713    echo Sending Objective-C test results to GCC community..
     714    ${GCCDIR}/contrib/test_summary -m gcc-testresults@gcc.gnu.org | sh
     715    if [ $? -ne 0 ] ; then
     716      echo "Failed to email Objective-C Test Results to GCC Community .. bailing"
     717      exit 1
     718    fi
     719
     720    echo Sending test results to RTEMS community..
     721    ${GCCDIR}/contrib/test_summary -o -m rtems-tooltestresults@rtems.org | sh
     722    if [ $? -ne 0 ] ; then
     723      echo "Failed to email Objective-C Test Results to RTEMS Community .. bailing"
     724      exit 1
     725    fi
     726  fi
     727  cd .. || exit 1
     728else
     729  echo Skipping Objective-C Tests for ${cpu}
     730fi
     731
     732if [ ${do_ada} = "yes" ] ; then
     733  test ${do_cleanup} = "yes" && rm -rf b-${cpu}-ada
     734fi
     735
    631736##### Build an Ada compiler now that we have a cross installed
    632737j_gccada()
     
    644749
    645750  if [ ${verbose} = yes ] ; then
    646     echo "Cross GCC ==>" `type ${TARGET}-gcc`
     751    echo "Cross GCC for Ada ==>" `type ${TARGET}-gcc`
    647752  fi
    648753
     
    666771  status=$?
    667772  if [ $status -ne 0 ] ; then
    668     echo "Failed building Go"
     773    echo "Failed building Ada"
    669774  fi
    670775}
     
    714819j_gccgo()
    715820{
    716 set -x
    717821  if [ X${1} = X ] ; then
    718822    echo Usage: $0 TARGET_CPU
     
    774878
    775879##### Do the gccgo tests
    776 set -x
    777880if [ $a ${run_gccgotests} = "yes" -a \
    778881     -d ${BASEDIR}/b-${cpu}-go -a ${go_fail} = "no" ] ; then
  • gcc/rundeja

    rde50b14 r797494c  
    118118fi
    119119
    120 if [ $2 = libgo ] ; then
    121   rtems_libgo_init=${SCRIPTDIR}/gcc/rtems_libgo_init.c
    122   rtems_bin2c=${INSTALL}/bin/rtems-bin2c
    123   make check-target-libgo RUNTESTFLAGS="\
    124   SIM=${BSP_SIM} \
    125   RTEMS_MAKEFILE_PATH=${rtemsdir} \
    126   RTEMS_LIBGO_INIT=${rtems_libgo_init} \
    127   RTEMS_BIN2C=${rtems_bin2c} \
    128   RTEMS_CONFIG_OBJ= \
    129   --target_board=rtems-${CPU}-${DEJABSP} \
    130   "
    131 elif [ $2 = gccgo ] ; then
    132   RTEMS_MAKEFILE_PATH=${rtemsdir} \
    133   SCRIPTDIR=${SCRIPTDIR} \
    134     make -f ${SCRIPTDIR}/gcc/Makefile.rtems_gccgoinit
    135   if [ $? -ne 0 ] ; then
    136     echo unable to compile RTEMS GCC Go Init File
    137     exit 1
    138   fi
    139   rtems_config=`pwd`/rtems_gccgo_init.o
    140   make check-go RUNTESTFLAGS="\
    141   SIM=${BSP_SIM} \
    142   RTEMS_MAKEFILE_PATH=${rtemsdir} \
    143   RTEMS_CONFIG_OBJ=${rtems_config} \
    144   --target_board=rtems-${CPU}-${DEJABSP} \
    145   "
    146 else
    147   RTEMS_MAKEFILE_PATH=${rtemsdir} \
    148   SCRIPTDIR=${SCRIPTDIR} \
    149     make -f ${SCRIPTDIR}/gcc/Makefile.rtems_gccmain
    150   if [ $? -ne 0 ] ; then
    151     echo unable to compile RTEMS GCC Main
    152     exit 1
    153   fi
    154   rtems_config=`pwd`/rtems_gcc_main.o
    155   make check-gcc RUNTESTFLAGS="\
    156   SIM=${BSP_SIM} \
    157   RTEMS_MAKEFILE_PATH=${rtemsdir} \
    158   RTEMS_CONFIG_OBJ=${rtems_config} \
    159   --target_board=rtems-${CPU}-${DEJABSP} \
    160   "
    161 fi
     120case $2 in
     121  libgo)
     122    rtems_libgo_init=${SCRIPTDIR}/gcc/rtems_libgo_init.c
     123    rtems_bin2c=${INSTALL}/bin/rtems-bin2c
     124    make check-target-libgo RUNTESTFLAGS="\
     125    SIM=${BSP_SIM} \
     126    RTEMS_MAKEFILE_PATH=${rtemsdir} \
     127    RTEMS_LIBGO_INIT=${rtems_libgo_init} \
     128    RTEMS_BIN2C=${rtems_bin2c} \
     129    RTEMS_CONFIG_OBJ= \
     130    --target_board=rtems-${CPU}-${DEJABSP} \
     131    "
     132    ;;
     133  gccgo)
     134    RTEMS_MAKEFILE_PATH=${rtemsdir} \
     135    SCRIPTDIR=${SCRIPTDIR} \
     136      make -f ${SCRIPTDIR}/gcc/Makefile.rtems_gccgoinit
     137    if [ $? -ne 0 ] ; then
     138      echo unable to compile RTEMS GCC Go Init File
     139      exit 1
     140    fi
     141    rtems_config=`pwd`/rtems_gccgo_init.o
     142    make check-go RUNTESTFLAGS="\
     143    SIM=${BSP_SIM} \
     144    RTEMS_MAKEFILE_PATH=${rtemsdir} \
     145    RTEMS_CONFIG_OBJ=${rtems_config} \
     146    --target_board=rtems-${CPU}-${DEJABSP} \
     147    "
     148    ;;
     149  gcc)
     150    RTEMS_MAKEFILE_PATH=${rtemsdir} \
     151    SCRIPTDIR=${SCRIPTDIR} \
     152      make -f ${SCRIPTDIR}/gcc/Makefile.rtems_gccmain
     153    if [ $? -ne 0 ] ; then
     154      echo unable to compile RTEMS GCC Main
     155      exit 1
     156    fi
     157    rtems_config=`pwd`/rtems_gcc_main.o
     158    make check-gcc RUNTESTFLAGS="\
     159    SIM=${BSP_SIM} \
     160    RTEMS_MAKEFILE_PATH=${rtemsdir} \
     161    RTEMS_CONFIG_OBJ=${rtems_config} \
     162    --target_board=rtems-${CPU}-${DEJABSP} \
     163    "
     164    ;;
     165  *)
     166    RTEMS_MAKEFILE_PATH=${rtemsdir} \
     167    SCRIPTDIR=${SCRIPTDIR} \
     168      make -f ${SCRIPTDIR}/gcc/Makefile.rtems_gccmain
     169    if [ $? -ne 0 ] ; then
     170      echo unable to compile RTEMS GCC Main
     171      exit 1
     172    fi
     173    rtems_config=`pwd`/rtems_gcc_main.o
     174    echo make check RUNTESTFLAGS="\
     175    SIM=${BSP_SIM} \
     176    RTEMS_MAKEFILE_PATH=${rtemsdir} \
     177    RTEMS_CONFIG_OBJ=${rtems_config} \
     178    --target_board=rtems-${CPU}-${DEJABSP} \
     179    "
     180exit 0
     181    ;;
     182esac
     183
    162184# "execute.exp=pr206*"
    163185# vect.exp=vect*
  • gcc/test_driver

    rde50b14 r797494c  
    5151test_driver [options] CPU ..  CPU
    5252  -A - enable clean, native, and update
     53  -1 - build basic tools (default=yes)
    5354  -a - build Ada (default=yes)
    54   -G - build GCC Go (default=no)
     55  -G - build GCC Go (default=yes)
    5556  -c - clean install point (also installs auto tools)
    5657  -m - mail results to lists (default=yes)
     
    6768doUpdateRTEMS="no"
    6869doNative="no"
     70doBasicTools="yes"
    6971verbose="no"
    7072doAda="yes"
    71 doGccGo="no"
     73doGccGo="yes"
    7274doMail="yes"
    7375doTests="yes"
    74 
    75 while getopts AacmnuGTUv OPT
     76justTests="no"
     77
     78while getopts j1AacmnuGTUv OPT
    7679do
    7780  case "$OPT" in
     
    8184       doUpdateRTEMS=`toggle ${doUpdateRTEMS}`
    8285       ;;
     86    1) doBasicTools=`toggle ${doBasicTools}` ;;
    8387    a) doAda=`toggle ${doAda}` ;;
    8488    G) doGccGo=`toggle ${doGccGo}` ;;
    8589    c) doCleanInstallPoint=`toggle ${doCleanInstallPoint}` ;;
     90    j) justTests=`toggle ${justTests}` ;;
    8691    m) doMail=`toggle ${doMail}` ;;
    8792    n) doNative=`toggle ${doNative}` ;;
     
    121126fi
    122127
     128
    123129if [ ${verbose} = "yes" ] ; then
    124130  echo "Clean Install Point: " ${doCleanInstallPoint}
     
    127133  echo "Update Tool Source:  " ${doUpdateTools}
    128134  echo "Update RTEMS:        " ${doUpdateRTEMS}
     135  echo "Build Basic Tools:   " ${doBasicTools}
    129136  echo "Build Ada:           " ${doAda}
    130137  echo "Build GCC Go:        " ${doGccGo}
     
    134141fi
    135142
    136 test ${doMail}  = "no"   && mailArg="-M"
    137 test ${doTests} = "yes" && testArg="-T"
    138 test ${doAda}   = "yes" && adaArg="-a"
    139 test ${doGccGo} = "yes" && gccgoArg="-G"
     143test ${doMail}  = "no"       && mailArg="-M"
     144test ${doTests} = "yes"      && testArg="-T"
     145test ${doAda}   = "yes"      && adaArg="-a"
     146test ${doGccGo} = "yes"      && gccgoArg="-G"
     147test ${doBasicTools} = "yes" && basicArgs="-b -D -1 -r"
     148
     149echo "Checking for just tests override"
     150if [ ${justTests} = "yes" ] ; then
     151  adaArg=""
     152  gccgoArg=""
     153  basicArgs=""
     154fi
    140155
    141156start=`date`
     
    250265    doOne=${SCRIPTDIR}/gcc/do_one
    251266    echo "Building ${cpu}/${bsp}..."
    252     time sh -x ${doOne} -v -b -D -1 -d -r \
     267    echo "time sh -x ${doOne} -v -d ${basicArgs}  \
     268        ${gccgoArg} ${adaArg} ${mailArg} ${testArg} \
     269        ${cpu} ${bsp} >${BASEDIR}/${bsp}.log 2>&1"
     270    time sh -x ${doOne} -v -d ${basicArgs}  \
    253271        ${gccgoArg} ${adaArg} ${mailArg} ${testArg} \
    254272        ${cpu} ${bsp} >${BASEDIR}/${bsp}.log 2>&1
Note: See TracChangeset for help on using the changeset viewer.