Changeset 288a6fb in rtems-testing


Ignore:
Timestamp:
Jul 21, 2010, 12:41:37 PM (9 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, 8895273c193787f84c4585a10f6d6aceb3b25dc4
Children:
396b977
Parents:
64b459b
Message:

2010-07-21 Vinu Rajashekhar <vinutheraj@…>

  • do_one, rundeja, test_driver: Add Go support. Plus some cleanup from Joel.
Location:
gcc
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • gcc/ChangeLog

    r64b459b r288a6fb  
     12010-07-21      Vinu Rajashekhar <vinutheraj@gmail.com>
     2
     3        * do_one, rundeja, test_driver: Add Go support. Plus some cleanup from
     4        Joel.
     5
    162010-07-19      Joel Sherrill <joel.sherrill@oarcorp.com>
    27
  • gcc/do_one

    r64b459b r288a6fb  
    4242do_ada=no
    4343  do_ada_multilib=yes
     44# Build the GCC Go language cross compiler.
     45do_gccgo=no
     46        do_gccgo_multilib=yes
    4447# Build RTEMS for a particular CPU/BSP combination
    4548do_rtems=no
     
    4750run_gcctests=no
    4851run_acats=no
     52run_gccgotests=no
    4953# Do we send email to gcc-testresults with the test results?
    5054do_mail=yes
     
    5761cat <<EOF
    5862do_one [options] CPU BSP
    59   -A - binutils, stage 1, C++, C/C++ multilib, Ada, RTEMS
    60   -T - run GCC and Ada tests
     63  -A - binutils, stage 1, C++, C/C++ multilib, Ada, GCC Go, RTEMS
     64  -T - run GCC, Ada and GCC Go tests
    6165  -b - install binutils (from source or copy installed RPM contents)
    6266  -D - install gdb (from source or copy installed RPM contents)
     
    6670  -m -   do not build multilib
    6771  -a - stage 2 Ada compiler
     72  -G - stage 2 GCC Go compiler
    6873  -r - build RTEMS
    6974  -g - run GCC C/C++ tests
     
    7277  -v - verbose
    7378  -M - do NOT email test results to gcc-testresults
     79  -o - run GCC Go tests
    7480EOF
    7581}
     
    9096}
    9197
    92 while getopts bdDnv1cmargCATM OPT
     98while getopts bdDnv1cmargioCATMG OPT
    9399do
    94100    case "$OPT" in
     
    99105           do_multilib="yes"
    100106           do_ada="yes"
     107           do_gccgo="yes"
    101108           do_rtems="yes"
    102109           ;;
     
    105112        T) run_gcctests="yes"
    106113           run_acats="yes"
     114           run_gccgotests="yes"
    107115           ;;
    108116        # unrpm binutils
     
    116124        # Stage 2 arguments
    117125        a) do_ada=`toggle ${do_ada}` ;;
     126        G) do_gccgo=`toggle ${do_gccgo}` ;;
    118127        # Build RTEMS
    119128        r) do_rtems=`toggle ${do_rtems}` ;;
     
    123132        v) verbose=`toggle ${verbose}` ;;
    124133        M) do_mail=`toggle ${do_mail}` ;;
    125         *) fatal;;
     134        o) run_gccgotests=`toggle ${run_gccgotests}` ;;
     135        *) fatal ;;
    126136    esac
    127137done
     
    157167  echo "  Ada         : " ${do_ada}
    158168  echo "  Multilib    : " ${do_ada_multilib}
     169  echo "  GCC Go      : " ${do_gccgo}
     170  echo "  Multilib    : " ${do_gccgo_multilib}
    159171  echo "Build RTEMS   : " ${do_rtems}
    160172  echo "Run GCC Tests : " ${run_gcctests}
    161173  echo "Run ACATS     : " ${run_acats}
     174  echo "Run Go Tests  : " ${run_gccgotests}
    162175  echo "Email Tests   : " ${do_mail}
    163176  echo "Native GCC    : " `type gcc`
     
    171184
    172185if [ ${do_binutils} = yes -o ${do_gdb} = yes -o \
    173      ${do_stage1} = yes -o ${do_ada} = yes ] ; then
     186     ${do_stage1} = yes -o ${do_ada} = yes -o ${do_gccgo} = yes ] ; then
    174187  needCPU=yes
    175188fi
    176189
    177 if [ ${do_rtems} = yes -o ${run_gcctests} = yes -o ${run_acats} = yes ] ; then
     190if [ ${do_native} = yes -a ${do_gccgo} = yes ] ; then
     191  echo "Warning! Go requires native C++ to build."
     192  do_cxx=yes
     193fi
     194
     195if [ ${do_rtems} = yes -o ${run_gcctests} = yes -o \
     196     ${run_acats} = yes -o ${run_gccgotests} = yes ] ; then
    178197  needBSP=yes
    179198  needCPU=yes
     
    499518      ENABLE_BSP="${ENABLE_BSP} USE_COM1_AS_CONSOLE=1"
    500519      ENABLE_BSP="${ENABLE_BSP} BSP_PRESS_KEY_FOR_RESET=0"
     520      ENABLE_BSP="${ENABLE_BSP} BSP_RESET_BOARD_AT_EXIT=0"
    501521      ;;
    502522    *) ;;
     
    528548  echo "Running GCC Tests..."
    529549  cd ${BASEDIR}/b-gcc1-${cpu} || exit 1
    530   time sh -x ${SCRIPTDIR}/gcc/rundeja ${bsp} \
     550  time sh -x ${SCRIPTDIR}/gcc/rundeja ${bsp} gcc\
    531551    >${LOGDIR}/${cpu}-gcctests-${bsp}.log 2>&1
    532552
     
    560580
    561581##### Build an Ada compiler now that we have a cross installed
    562 j_gcc2()
     582j_gccada()
    563583{
    564584  if [ X${1} = X ] ; then
     
    600620  echo "Building Stage 2 cross Ada compiler for ${1} ..."
    601621  (cd ${BASEDIR} && \
    602    rm -rf b-gcc2-${cpu} && \
    603    mkdir  b-gcc2-${cpu} && \
    604    cd b-gcc2-${cpu} && \
    605    time j_gcc2 ${cpu} >${LOGDIR}/${cpu}-stage2.log 2>&1 && cd ..) || exit 1
     622   rm -rf b-gccada-${cpu} && \
     623   mkdir  b-gccada-${cpu} && \
     624   cd b-gccada-${cpu} && \
     625   time j_gccada ${cpu} >${LOGDIR}/${cpu}-ada.log 2>&1 && cd ..) || exit 1
    606626else
    607627  echo Skipping Stage 2 Ada for ${cpu}
     
    609629
    610630#### Run the Ada ACATS tests
    611 if [ ${run_acats} = "yes" -a -d b-gcc2-${cpu} ] ; then
     631if [ ${run_acats} = "yes" -a -d b-gccada-${cpu} ] ; then
    612632  echo "Running ACATS..."
    613633  cd ${GCCDIR}/gcc/testsuite/ada/acats/ || exit 1
     
    632652
    633653if [ ${do_ada} = "yes" ] ; then
    634   test ${do_cleanup} = "yes" && rm -rf b-gcc2-${cpu}
     654  test ${do_cleanup} = "yes" && rm -rf b-gccada-${cpu}
     655fi
     656
     657##### Build a GCC Go compiler now that we have a cross installed
     658j_gccgo()
     659{
     660  if [ X${1} = X ] ; then
     661    echo Usage: $0 TARGET_CPU
     662    exit 1
     663  fi
     664  TARGET=${1}-rtems${RTEMS_VERSION}
     665
     666  if [ ! -d ${INSTALL} ]; then
     667    echo ${INSTALL} does not exist
     668    exit 1
     669  fi
     670
     671  if [ ${verbose} = yes ] ; then
     672    echo "Cross GCC ==>" `type ${TARGET}-gcc`
     673  fi
     674
     675  if [ ${do_gccgo_multilib} = yes ] ; then
     676     gccgo_multilib="--enable-multilib"
     677  else
     678     gccgo_multilib="--disable-multilib"
     679  fi
     680
     681  case ${TARGET} in
     682    i386*) GOFLAGS="-march=i486" ;;
     683    *)     GOFLAGS="" ;;
     684  esac
     685#    CFLAGS_FOR_TARGET=-B${BSP_INSTALL}/${TARGET}/${BSP_BUILT}/lib/
     686
     687  ${GCCDIR}/configure \
     688   ${GCC_EXTRA_ARGS} \
     689   CFLAGS_FOR_TARGET="-B${BSP_INSTALL}/${TARGET}/${BSP_BUILT}/lib/ ${GOFLAGS}" \
     690     --enable-threads=rtems --with-gnu-as ${gccgo_multilib} \
     691     --enable-newlib-mb --enable-newlib-iconv \
     692     --with-gnu-ld --with-newlib  --verbose --with-system-zlib --disable-nls \
     693     --enable-version-specific-runtime-libs \
     694    --enable-languages=c,go --target=$TARGET --prefix=$INSTALL &&
     695  make ${MAKEJOBS} &&
     696  make install
     697}
     698
     699if [ ${do_gccgo} = "yes" ] ; then
     700  echo "Building Stage 2 cross GCC Go compiler for ${1} ..."
     701  (cd ${BASEDIR} && \
     702   rm -rf b-gccgo1-${cpu} && \
     703   mkdir  b-gccgo1-${cpu} && \
     704   cd b-gccgo1-${cpu} && \
     705   time j_gccgo ${cpu} >${LOGDIR}/${cpu}-go.log 2>&1 && cd ..) || exit 1
     706else
     707  echo Skipping GCC Go for ${cpu}
     708fi
     709
     710##### Do the gccgo tests
     711if [ ${run_gccgotests} = "yes" ] ; then
     712  echo "Running GCC Go Tests..."
     713  cd ${BASEDIR}/b-gccgo1-${cpu}/gcc || exit 1
     714  time sh -x ${SCRIPTDIR}/gcc/rundeja ${bsp} gccgo \
     715    >${LOGDIR}/${cpu}-gccgotests-${bsp}.log 2>&1
     716
     717  RDIR=${RESULTSDIR}/${TARGET}-${bsp}/`date +%Y-%m-%d-%H-%M-%S`
     718  mkdir -p ${RDIR}
     719  cp testsuite/go/go.log testsuite/go/go.sum ${RDIR}
     720
     721  if [ ${do_mail} = "yes" ] ; then
     722    echo Sending test results to GCC community..
     723    ${DIR}/contrib/test_summary -m gcc-testresults@gcc.gnu.org | sh
     724    if [ $? -ne 0 ] ; then
     725      echo "Failed to email GCC Test Results to GCC Community .. bailing"
     726      exit 1
     727    fi
     728
     729    echo Sending test results to RTEMS community..
     730    ${GCCDIR}/contrib/test_summary -o -m rtems-tooltestresults@rtems.org | sh
     731    if [ $? -ne 0 ] ; then
     732      echo "Failed to email GCC Test Results to RTEMS Community .. bailing"
     733      exit 1
     734    fi
     735  fi
     736  cd .. || exit 1
     737else
     738  echo Skipping GCC Go DejaGNU tests for ${cpu}/${bsp}
     739fi
     740
     741if [ ${do_gccgo} = "yes" ] ; then
     742  test ${do_cleanup} = "yes" && rm -rf b-gccgo1-${cpu}
    635743fi
    636744exit 0
  • gcc/rundeja

    r64b459b r288a6fb  
    33#
    44
    5 if [ $# -ne 1 ] ; then
    6   echo USAGE: BSP
     5if [ $# -lt 2 ] ; then
     6  echo USAGE: BSP COMPILER
    77  exit 1
    88fi
     
    112112fi
    113113
    114 RTEMS_MAKEFILE_PATH=${rtemsdir} \
    115 SCRIPTDIR=${SCRIPTDIR} \
    116   make -f ${SCRIPTDIR}/gcc/Makefile.rtems_gccmain
    117 if [ $? -ne 0 ] ; then
    118   echo unable to compile RTEMS GCC Main
    119   exit 1
     114if [ $2 = gccgo ] ; then
     115  RTEMS_MAKEFILE_PATH=${rtemsdir} \
     116  SCRIPTDIR=${SCRIPTDIR} \
     117    make -f ${SCRIPTDIR}/gcc/Makefile.rtems_gccgoinit
     118  if [ $? -ne 0 ] ; then
     119    echo unable to compile RTEMS GCC Go Init File
     120    exit 1
     121  fi
     122  rtems_config=`pwd`/rtems_gccgo_init.o
     123  make check-go RUNTESTFLAGS="\
     124  SIM=${BSP_SIM} \
     125  RTEMS_MAKEFILE_PATH=${rtemsdir} \
     126  RTEMS_CONFIG_OBJ=${rtems_config} \
     127  --target_board=rtems-${CPU}-${DEJABSP} \
     128  "
     129else
     130  RTEMS_MAKEFILE_PATH=${rtemsdir} \
     131  SCRIPTDIR=${SCRIPTDIR} \
     132    make -f ${SCRIPTDIR}/gcc/Makefile.rtems_gccmain
     133  if [ $? -ne 0 ] ; then
     134    echo unable to compile RTEMS GCC Main
     135    exit 1
     136  fi
     137  rtems_config=`pwd`/rtems_gcc_main.o
     138  make check-gcc RUNTESTFLAGS="\
     139  SIM=${BSP_SIM} \
     140  RTEMS_MAKEFILE_PATH=${rtemsdir} \
     141  RTEMS_CONFIG_OBJ=${rtems_config} \
     142  --target_board=rtems-${CPU}-${DEJABSP} \
     143  "
    120144fi
    121 rtems_config=`pwd`/rtems_gcc_main.o
    122 make check-gcc RUNTESTFLAGS="\
    123 SIM=${BSP_SIM} \
    124 RTEMS_MAKEFILE_PATH=${rtemsdir} \
    125 RTEMS_CONFIG_OBJ=${rtems_config} \
    126 --target_board=rtems-${CPU}-${DEJABSP} \
    127 "
    128145# "execute.exp=pr206*"
    129146# vect.exp=vect*
  • gcc/test_driver

    r64b459b r288a6fb  
    4545  -A - enable clean, native, and update
    4646  -a - build Ada (default=yes)
     47  -G - build GCC Go (default=yes)
    4748  -c - clean install point (also installs auto tools)
    4849  -m - mail results to lists (default=yes)
     
    6162verbose="no"
    6263doAda="yes"
     64doGccGo="yes"
    6365doMail="yes"
    6466doTests="yes"
     
    7375       ;;
    7476    a) doAda=`toggle ${doAda}` ;;
     77    G) doGccGo=`toggle ${doGccGo}` ;;
    7578    c) doCleanInstallPoint=`toggle ${doCleanInstallPoint}` ;;
    7679    m) doMail=`toggle ${doMail}` ;;
     
    106109  echo "Update Tool Source:  " ${doUpdateTools}
    107110  echo "Update RTEMS:        " ${doUpdateRTEMS}
    108   echo "Build Ada            " ${doAda}
     111  echo "Build Ada:           " ${doAda}
     112  echo "Build GCC Go:        " ${doGccGo}
    109113  echo "Email Results:       " ${doMail}
    110114  echo "Run Tests:           " ${doTests}
     
    119123test ${doTests} = "yes" && testArg="-T"
    120124test ${doAda}   = "yes" && adaArg="-a"
     125test ${doGccGo} = "yes" && gccgoArg="-G"
    121126
    122127start=`date`
     
    216221
    217222    doOne=${SCRIPTDIR}/gcc/do_one
    218     time sh -x ${doOne} -v -b -D -1 -d -r ${adaArg} ${mailArg} ${testArg} \
     223    time sh -x ${doOne} -v -b -D -1 -d -r ${gccgoArg} ${adaArg} ${mailArg} ${testArg} \
    219224        ${cpu} ${bsp} >${BASEDIR}/${bsp}.log 2>&1
    220225    echo $?
Note: See TracChangeset for help on using the changeset viewer.