Home | History | Annotate | Download | only in testsuite
      1 #! /bin/sh
      2 bitmode=""
      3 
      4 # This shell script is used to run the ltrace test suite.  It is possible to
      5 # run it via 'make check' using RUNTESTFLAGS.  This script just makes it easy.
      6 
      7 function usage
      8 {
      9   echo usage: `basename $0` '-m32|-m64 [<tool> | ""] [<test.exp>]'
     10 }
     11 
     12 # The first argument is not optional: it must either be -m32 or -m64.  If the
     13 # second argument is used, it specifies the file name of the ltrace to be
     14 # tested.  The third argument specifies a particular test case to run.  If
     15 # the third argument is omitted, then all test cases are run.  If you wish to
     16 # use the third argument, but not the second, specify the second as "".
     17 
     18 # there is a secret argument: if the name of this script is 'test', then
     19 # the --verbose argument is added to RUNTESTFLAGS.
     20 
     21 if [ x"$1" == x -o x"$1" != x-m32 -a x"$1" != x-m64 ]; then
     22   usage
     23   exit 1
     24 fi
     25 
     26 flags=''
     27 
     28 if [ `basename $0` == test ]; then
     29   flags="--verbose "
     30 fi
     31 
     32 if [ x"$2" != x ]; then
     33   flags="${flags}--tool_exec=$2 "
     34 fi
     35 
     36 flags="${flags}CFLAGS_FOR_TARGET=$1"
     37 
     38 if [ x"$3" != x ]; then
     39   flags="$flags $3"
     40 fi
     41 
     42 set -o xtrace
     43 make check RUNTESTFLAGS="$flags"
     44