4.104.115
Last change
on this file since 5a6d25fc was
5a6d25fc,
checked in by Till Straumann <strauman@…>, on 09/11/09 at 22:42:00
|
2009-09-11 Till Straumann <Till.Straumann@…>
- psim-top.in, psim-bottom: Added support for options
-d (print device tree and exit), -h (usage info) and
-n (enable NIC support).
- psim-gdb-bottom: Added support for options -s (force sysv IPC),
-h (usage info) and -n (enable NIC support).
Allow user to override GDB variable from environment.
- psim-shared: cat NIC properties into device file if the
user had specified '-n'.
- runtest-top.in: removed unsupported options -o, -d from
usage info.
|
-
Property mode set to
100755
|
File size:
1.7 KB
|
Line | |
---|
1 | #!@KSH@ -p |
---|
2 | # |
---|
3 | # Run rtems tests on the powerpc simulator |
---|
4 | # This program generates a simulator script to run each test |
---|
5 | # Typically the test is then run, although it can be generated |
---|
6 | # and left as a file using -s |
---|
7 | # |
---|
8 | # COPYRIGHT (c) 1989-2008. |
---|
9 | # On-Line Applications Research Corporation (OAR). |
---|
10 | # |
---|
11 | # The license and distribution terms for this file may be |
---|
12 | # found in found in the file LICENSE in this distribution or at |
---|
13 | # http://www.rtems.com/license/LICENSE. |
---|
14 | # |
---|
15 | # $Id$ |
---|
16 | # |
---|
17 | |
---|
18 | # progname=`basename $0` |
---|
19 | progname=${0##*/} # fast basename hack for ksh, bash |
---|
20 | if [ X${RUN} = X ] ; then |
---|
21 | RUN=@target_alias@-run |
---|
22 | fi |
---|
23 | |
---|
24 | USAGE=\ |
---|
25 | "usage: $progname [ -opts ] test [ test ... ] |
---|
26 | -v -- verbose |
---|
27 | -l logdir -- specify log directory (default is 'logdir') |
---|
28 | |
---|
29 | Specify test as 'test' or 'test.exe'. |
---|
30 | All multiprocessing tests *must* be specified simply as 'mp01', etc. |
---|
31 | " |
---|
32 | |
---|
33 | # export everything |
---|
34 | set -a |
---|
35 | |
---|
36 | # log an error to stderr |
---|
37 | prerr() |
---|
38 | { |
---|
39 | echo "$*" >&2 |
---|
40 | } |
---|
41 | |
---|
42 | fatal() { |
---|
43 | [ "$1" ] && prerr $* |
---|
44 | prerr "$USAGE" |
---|
45 | exit 1 |
---|
46 | } |
---|
47 | |
---|
48 | warn() { |
---|
49 | [ "$1" ] && prerr $* |
---|
50 | } |
---|
51 | |
---|
52 | # print args, 1 per line |
---|
53 | ml_echo() |
---|
54 | { |
---|
55 | for l |
---|
56 | do |
---|
57 | echo "$l" |
---|
58 | done |
---|
59 | } |
---|
60 | |
---|
61 | # run at normal and signalled exit |
---|
62 | test_exit() |
---|
63 | { |
---|
64 | exit_code=$1 |
---|
65 | |
---|
66 | rm -f ${logfile}.tmp* |
---|
67 | [ "$sim_pid" ] && kill -9 $sim_pid |
---|
68 | |
---|
69 | exit $exit_code |
---|
70 | } |
---|
71 | |
---|
72 | # |
---|
73 | # process the options |
---|
74 | # |
---|
75 | # defaults for getopt vars |
---|
76 | # |
---|
77 | # max_run_time is defaulted to 5 minutes |
---|
78 | # |
---|
79 | |
---|
80 | verbose="" |
---|
81 | logdir=log |
---|
82 | update_on_tick="no" |
---|
83 | max_run_time=$((5 * 60)) |
---|
84 | instruction_limit=1000000000 |
---|
85 | |
---|
86 | while getopts vl: OPT |
---|
87 | do |
---|
88 | case "$OPT" in |
---|
89 | v) verbose="yes";; |
---|
90 | l) logdir="$OPTARG";; |
---|
91 | *) fatal;; |
---|
92 | esac |
---|
93 | done |
---|
94 | |
---|
95 | let $((shiftcount = $OPTIND - 1)) |
---|
96 | shift $shiftcount |
---|
97 | |
---|
98 | args=$* |
---|
99 | |
---|
100 | # |
---|
101 | # Check some parameters |
---|
102 | # |
---|
103 | |
---|
104 | # XXX nothing to check so far |
---|
Note: See
TracBrowser
for help on using the repository browser.