4.104.114.95
Last change
on this file since b3bbcdf1 was
e0487ed,
checked in by Joel Sherrill <joel.sherrill@…>, on 09/05/08 at 14:42:35
|
2008-09-05 Joel Sherrill <joel.sherrill@…>
- psim-shared, psim-top.in, runtest-bottom, runtest-top.in: Now running
mptests.
|
-
Property mode set to
100755
|
File size:
1.8 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 | -o options -- specify options to be passed to simulator |
---|
27 | -v -- verbose |
---|
28 | -d -- generate device tree file (as 'test'.device) and exit |
---|
29 | -l logdir -- specify log directory (default is 'logdir') |
---|
30 | |
---|
31 | Specify test as 'test' or 'test.exe'. |
---|
32 | All multiprocessing tests *must* be specified simply as 'mp01', etc. |
---|
33 | " |
---|
34 | |
---|
35 | # export everything |
---|
36 | set -a |
---|
37 | |
---|
38 | # log an error to stderr |
---|
39 | prerr() |
---|
40 | { |
---|
41 | echo "$*" >&2 |
---|
42 | } |
---|
43 | |
---|
44 | fatal() { |
---|
45 | [ "$1" ] && prerr $* |
---|
46 | prerr "$USAGE" |
---|
47 | exit 1 |
---|
48 | } |
---|
49 | |
---|
50 | warn() { |
---|
51 | [ "$1" ] && prerr $* |
---|
52 | } |
---|
53 | |
---|
54 | # print args, 1 per line |
---|
55 | ml_echo() |
---|
56 | { |
---|
57 | for l |
---|
58 | do |
---|
59 | echo "$l" |
---|
60 | done |
---|
61 | } |
---|
62 | |
---|
63 | # run at normal and signalled exit |
---|
64 | test_exit() |
---|
65 | { |
---|
66 | exit_code=$1 |
---|
67 | |
---|
68 | rm -f ${logfile}.tmp* |
---|
69 | [ "$sim_pid" ] && kill -9 $sim_pid |
---|
70 | |
---|
71 | exit $exit_code |
---|
72 | } |
---|
73 | |
---|
74 | # |
---|
75 | # process the options |
---|
76 | # |
---|
77 | # defaults for getopt vars |
---|
78 | # |
---|
79 | # max_run_time is defaulted to 5 minutes |
---|
80 | # |
---|
81 | |
---|
82 | verbose="" |
---|
83 | logdir=log |
---|
84 | update_on_tick="no" |
---|
85 | max_run_time=$((5 * 60)) |
---|
86 | instruction_limit=1000000000 |
---|
87 | |
---|
88 | while getopts vl: OPT |
---|
89 | do |
---|
90 | case "$OPT" in |
---|
91 | v) verbose="yes";; |
---|
92 | l) logdir="$OPTARG";; |
---|
93 | *) fatal;; |
---|
94 | esac |
---|
95 | done |
---|
96 | |
---|
97 | let $((shiftcount = $OPTIND - 1)) |
---|
98 | shift $shiftcount |
---|
99 | |
---|
100 | args=$* |
---|
101 | |
---|
102 | # |
---|
103 | # Check some parameters |
---|
104 | # |
---|
105 | |
---|
106 | # XXX nothing to check so far |
---|
Note: See
TracBrowser
for help on using the repository browser.