blob: 3882c799cdfbec2f9305ec58a22d682344753563 [file] [log] [blame]
Paul Gilliam98d884b2006-03-14 00:12:01 +01001#! /bin/sh
2bitmode=""
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
7function 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
21if [ x"$1" == x -o x"$1" != x-m32 -a x"$1" != x-m64 ]; then
22 usage
23 exit 1
24fi
25
26flags=''
27
28if [ `basename $0` == test ]; then
29 flags="--verbose "
30fi
31
32if [ x"$2" != x ]; then
33 flags="${flags}--tool_exec=$2 "
34fi
35
36flags="${flags}CFLAGS_FOR_TARGET=$1"
37
38if [ x"$3" != x ]; then
39 flags="$flags $3"
40fi
41
42set -o xtrace
43make check RUNTESTFLAGS="$flags"