source: rtems-testing/sim-scripts/pc386.in @ 7199b76

4.11
Last change on this file since 7199b76 was ef308ab, checked in by Joel Sherrill <joel.sherrill@…>, on May 10, 2010 at 8:31:15 PM

2010-05-10 Joel Sherrill <joel.sherrilL@…>

  • gdb-sim-run.in: Use 50 millisecond per period.
  • pc386.in: Switch from 486 to qemu32 CPU model.
  • qemu-lm32_evr.in: Increase time limits on some tests.
  • Property mode set to 100644
File size: 2.2 KB
Line 
1#
2#  i386/qemu Support
3#
4#  $Id$
5#
6
7bspUsesGDBSimulator="no"
8runBSP=NOT_OVERRIDDEN
9if [ ! -r ${runBSP} ] ; then
10  runBSP=qemu
11fi
12bspNeedsDos2Unix="yes"
13bspRunsFailRandomly="yes"
14
15# Set the defaults based upon arguments given and do some error checking
16if [ X${QEMUDIR} == X ] ; then
17  QEMUDIR=${HOME}/qemu
18fi
19if [ ! -d ${QEMUDIR} ] ; then
20  fatal Base directory ${QEMUDIR} does not exist or is not a directory
21fi
22
23if [ X${hd0Dir} == X ] ; then
24  hd0Dir=${QEMUDIR}/hd
25fi
26if [ ! -d ${hd0Dir} ] ; then
27  fatal VFAT directory ${hd0Dir} does not exist or is not a directory
28fi
29
30if [ X${fd0Image} == X ] ; then
31  fd0Image=${QEMUDIR}/pc386_fda
32fi
33if [ ! -e ${fd0Image} ] ; then
34  fatal Boot floppy ${fd0Image} does not exist or is not a file
35fi
36
37if [ ${verbose} == "yes" ] ; then
38  echo "QEMU Working Directory: " ${qemudir}
39  echo "QEMU VFAT HD Directory: " ${hd0Dir}
40  echo "QEMU Boot Floppy File : " ${fd0Image}
41fi
42
43runARGS()
44{
45  file ${1} | grep "Netboot image" >/dev/null 2>&1
46  if [ $? -eq 0 ] ; then
47    echo "INCORRECT FORMAT -- ${1}"
48    echo "MUST BE ELF -- look at using the .exe"
49    exit 1
50  fi
51
52  cp ${1} ${hd0Dir}/test.exe
53
54  if [ ${coverage} = yes ] ; then
55     rm -f trace ${1}.cov
56     COVERAGE_ARG="-trace ${1}.cov"
57  fi
58
59  # -cpu 486
60  # can also redirect to file with file:log/"`basename ${1} .exe`
61  SERIAL_ARG="stdio"
62  echo "-m 8 -boot a -fda ${fd0Image} -hda fat:${hd0Dir} ${COVERAGE_ARG} \
63         -monitor null -nographic -serial ${SERIAL_ARG} --no-reboot"
64}
65
66checkBSPFaults()
67{
68  for pattern in  \
69     "FAULTY THREAD WILL BE DELETED" \
70     "Error code pushed by processor itself"
71  do
72    grep "${pattern}" ${logfile}
73    if [ $? -eq 0 ] ; then
74      return 1
75    fi
76  done
77
78  return 0
79}
80
81bspCheckRunWasOK()
82{
83  tname=`get_tname $testname`
84
85  logfile=${logdir}/${tname}
86
87  # sometimes the log file indicates the test did not run
88  length=`grep -v "QEMU acceleration layer" ${logfile} | wc -c`
89  if [ ${length} -eq 0 ] ; then
90    echo 1
91  else
92    echo 0
93  fi
94}
95
96bspLimit()
97{
98  case ${1} in
99    *base_sp*) limit=5 ;;
100    *stackchk*)limit=5 ;;
101    *fatal*)   limit=5 ;;
102    *minimum*) limit=5 ;;
103    *psxtime*) limit=180 ;;
104    *cpuuse*)  limit=30 ;;
105    *)         limit=60 ;;
106  esac
107  echo ${limit}
108}
109
110bspGeneratesDeviceTree="no"
Note: See TracBrowser for help on using the repository browser.