Changeset 3e4b04d in rtems-testing for sim-scripts


Ignore:
Timestamp:
Jan 20, 2009, 7:21:26 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, 8895273c193787f84c4585a10f6d6aceb3b25dc4
Children:
033c8b1
Parents:
66dcbe8
Message:

2009-01-20 Joel Sherrill <joel.sherrill@…>

  • .cvsignore, Makefile, erc32.in, gdb-sim-run.in, mkrun: Add TSIM support for ERC32, LEON2, and LEON3 BSPs. Include using all three for coverage.
  • leon2.in, leon3.in, tsim-support: New files.
Location:
sim-scripts
Files:
3 added
6 edited

Legend:

Unmodified
Added
Removed
  • sim-scripts/.cvsignore

    r66dcbe8 r3e4b04d  
    1111jmr3904
    1212jmr3904-gdb
     13leon2
     14leon3
    1315m32csim
    1416m32csim-gdb
  • sim-scripts/ChangeLog

    r66dcbe8 r3e4b04d  
     12009-01-20      Joel Sherrill <joel.sherrill@OARcorp.com>
     2
     3        * .cvsignore, Makefile, erc32.in, gdb-sim-run.in, mkrun: Add TSIM
     4        support for ERC32, LEON2, and LEON3 BSPs. Include using all three for
     5        coverage.
     6        * leon2.in, leon3.in, tsim-support: New files.
     7
    182009-01-20      Joel Sherrill <joel.sherrill@oarcorp.com>
    29
  • sim-scripts/Makefile

    r66dcbe8 r3e4b04d  
    99SKYEYE_SCRIPTS=ant5206 bf537Stamp csb337 csb350 csb360 edb7312 ezkit533 \
    1010  rtl22xx smdk2410
    11 TSIM_SCRIPTS=erc32
     11TSIM_SCRIPTS=erc32 leon2 leon3
    1212GENERATED_SCRIPTS=${GDBSIM_SCRIPTS} ${SKYEYE_SCRIPTS} ${TSIM_SCRIPTS}
    1313COMPILED_PROGRAMS=usleep
     
    5353        ./mkrun no SPARC sparc erc32
    5454
     55leon2: gdb-sim-run.in leon2.in
     56        ./mkrun no SPARC sparc leon2
     57
     58leon3: gdb-sim-run.in leon3.in
     59        ./mkrun no SPARC sparc leon3
     60
    5561### GDB Simulator BSPs
    5662h8sim h8sim-gdb: gdb-sim-run.in gdb-sim.in h8sim.in
  • sim-scripts/erc32.in

    r66dcbe8 r3e4b04d  
    55#
    66
    7 bspUsesGDBSimulator="no"
    8 runBSP=tsim-erc32
     7tsimName=erc32
     8tsimGoAddress=0x2000000
    99
    10 type ${runBSP} >/dev/null 2>&1
    11 if [ $? -ne 0 ] ; then
    12   echo "Unable to find ${runBSP} on PATH."
    13   exit 1
    14 fi
    15 
    16 # required for this to run
    17 echo | ${runBSP} -nohaspnet >/dev/null
    18 if [ $? -ne 0 ] ; then
    19   echo "No TSIM License for this machine."
    20   exit 1
    21 fi
    22 
    23 runARGS()
    24 {
    25   echo ${1}
    26 }
    27 
    28 checkBSPFaults()
    29 {
    30   return 0
    31 }
    32 
    33 bspLimit()
    34 {
    35   testname=$1
    36   case ${tname} in
    37     *stackchk*)limit=5 ;;
    38     *fatal*)   limit=1 ;;
    39     *psxtime*) limit=180 ;;
    40     *)         limit=60 ;;
    41   esac
    42   return ${limit}
    43 }
    44 
    45 bspGeneratesDeviceTree="yes"
    46 bspTreeFile=erc32.conf
    47 
    48 ### Generate the PSIM device tree based upon the type of application being run
    49 bspGenerateDeviceTree()
    50 {
    51   if [ ${coverage} = yes ] ; then
    52     echo "coverage enable"
    53   fi
    54   echo "go 0x2000000 ${limit} s"
    55   if [ ${coverage} = yes ] ; then
    56     echo "coverage save ${2}.cov"
    57   fi
    58 }
     10##INSERT TSIM SUPPORT HERE
  • sim-scripts/gdb-sim-run.in

    r66dcbe8 r3e4b04d  
    6565generate_tree_and_exit="no"
    6666
    67 while getopts vgil:s OPT
     67while getopts vcgil:s OPT
    6868do
    6969 case "$OPT" in
     
    131131  logfile=$1
    132132
     133  ## Clean exit patterns -- delay for coverage to get written
    133134  for pattern in  \
    134135     "^.*EXECUTIVE SHUTDOWN" \
    135      "^\*\*\* END OF " \
     136     "^\*\*\* END OF "
     137  do
     138    grep "${pattern}" ${logfile} >/dev/null 2>&1
     139    if [ $? -eq 0 ] ; then
     140      if [ ${coverage} = "yes" ] ; then
     141        # give the simulator a chance to write the coverage
     142        # ASSUME: It will exit
     143        # TODO:  Add timeout logic here
     144        while :
     145        do
     146          kill -0 $pid 2> /dev/null
     147          running=$?
     148          if [ $running -eq 0 ] ; then
     149            sleep 1
     150          else
     151            return 1
     152          fi
     153        done
     154      fi
     155      return 1
     156    fi
     157  done
     158
     159  ## Error exit patterns -- should not happen on coverage runs
     160  for pattern in  \
    136161     "Suspending faulting task" \
    137162     "assertion failed"
    138163  do
    139     grep "${pattern}" ${logfile} >/dev/null
     164    grep "${pattern}" ${logfile} >/dev/null 2>&1
    140165    if [ $? -eq 0 ] ; then
    141166      return 1
     
    208233
    209234## Now run the tests
     235test ${verbose} = "yes" && \
     236  echo TESTS TO RUN: ${args}
    210237for toRun in $args
    211238do
     
    229256      exit 0
    230257    fi
     258    if [ ${verbose} = "yes" ] ; then
     259      echo "=================================================="
     260      cat ${bspTreeFile}
     261      echo "=================================================="
     262    fi
    231263  fi
    232264
    233265  if [ ${interactive} = "yes" ] ; then
     266    test ${verbose} = "yes" && \
     267      echo INTERACTIVE runtest ${toRun} ${testtype} 0
    234268    runtest ${toRun} ${testtype} 0
    235269    continue
     
    261295   esac
    262296
    263   test ${verbose} = "yes" && runtest ${toRun} ${testtype} ${limit}
     297  test ${verbose} = "yes" && \
     298    echo BACKGROUND runtest ${toRun} ${testtype} ${limit}
    264299  runtest ${toRun} ${testtype} ${limit}
    265300
  • sim-scripts/mkrun

    r66dcbe8 r3e4b04d  
    1818      -e "s/@BSP@/${BSP}/" \
    1919      -e "/^##INSERT BSP SUPPORT HERE/r ${BSP}.in" | \
    20   sed -e "/^##INSERT SKYEYE SUPPORT HERE/r skyeye-support" >${RUN}
     20  sed -e "/^##INSERT SKYEYE SUPPORT HERE/r skyeye-support" \
     21      -e "/^##INSERT TSIM SUPPORT HERE/r tsim-support" >${RUN}
    2122chmod +x ${RUN}
    2223
Note: See TracChangeset for help on using the changeset viewer.