ae838fba66adf7fc8d124d9a87b65f79ceea1a0a
3 if [ -z "$RUNLTTV" ]; then
4 RUNLTTV
=~
/devel
/lttv
/runlttv
8 echo "$0: $@" >/dev
/stderr
12 echo "Usage: $0 [ -N pattern_name ] [ -n pattern_count ] PATTERN TRACE_PARENT_DIR"
15 if [ ! -x "$RUNLTTV" ]; then
16 echo "$0: $RUNLTTV not executable. Edit \$RUNLTTV to point to your lttv source directory." >/dev
/stderr
20 while getopts ":n:N:" options
; do
22 n
) expected_count
=$OPTARG;;
32 shift $
(($OPTIND - 1))
35 if [ -z "$pattern" ]; then
36 error
"no pattern specified"
42 error
"no trace directory specified"
46 traces
=$
(find "$2" -mindepth 1 -maxdepth 1 -type d
)
48 echo -n "Analyzing trace ($name): "
50 cnt
=$
($RUNLTTV -m text
"$traces" |
grep "$pattern" |
wc -l)
51 if [ -z "$expected_count" ]; then
52 if [ "$cnt" -eq "0" ]; then
54 echo "Did not find at least one instance of this event ($cnt)"
61 if [ "$cnt" -ne "$expected_count" ]; then
63 echo "Expected: $expected_count"
This page took 0.034721 seconds and 3 git commands to generate.