summaryrefslogtreecommitdiff
path: root/do_cpus
blob: 1a42792eaa6f11348a4b68501f5a84afc250bf72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#! /bin/sh


vfile=`dirname $0`/VERSIONS
if [ ! -r ${vfile} ] ; then
  echo VERSIONS file not found
  exit 1
fi

source ${vfile}

start=`date`
echo Started at: ${start}

tests=-T

bsp=

exitStatus=0
for cpu in $*
do
  case $cpu in
    native)  bsp=native       ;;
    sparc)   bsp=sis          ;;
    powerpc) bsp=psim         ;;
    i386)    bsp=pc386        ;;
    m32c)    bsp=m32csim      ;;
    m32r)    bsp=m32rsim      ;;
    mips)    bsp=jmr3904      ;;
    bfin)    bsp=eZKit533     ;;
    h8300)   bsp=h8sim        ;;
    sh)      bsp=simsh1       ;;
    arm)     bsp=edb7312      ;;
    m68k)    bsp=mcf5206elite ;;
    *)
      echo "Unknown CPU ${cpu}"
      exit 1
      ;;
  esac

  doOne=${SCRIPTDIR}/do_one 
  echo Building tools for ${cpu} and testing on ${bsp} ... 
  if [ ${cpu} = "native" ] ; then
    time sh -x ${doOne} -n >native.log 2>&1
    if [ $? -ne 0 ] ; then
      echo NATIVE FAILED!!! BAILING
      exitStatus=1
      break
    fi
  else
    # Everything
    time sh -x ${doOne} -v -A ${tests} ${cpu} ${bsp} >${bsp}.log 2>&1
    # Just C
    #time sh -x ${doOne} -v -b -D -1 -r ${tests} ${cpu} ${bsp} >${bsp}.log 2>&1
    # Just C/C++
    #time sh -x ${doOne} -v -1 -r -g ${tests} ${cpu} ${bsp} >${bsp}.log 2>&1
  fi
  echo $?
done


stopped=`date`
echo Started at: ${start}
echo Stopped at: ${stopped}
exit $exitStatus