aboutsummaryrefslogtreecommitdiff
path: root/testsuite/runtest.main/options.exp
blob: 4154d14bef8a933832a0dc0949fe3fc4e98127f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# Copyright (C) 1992-2016, 2018, 2020, 2023 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
# DejaGnu is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# DejaGnu is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with DejaGnu; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.

# This file was written by Rob Savoye <rob@welcomehome.org>.

load_lib util-defs.exp

runtest_setup_nested_testsuite

#
# Set up the list.
# 1st field is the command line option.
# 2nd field is the pattern to match.
#	NOTE - No variable substitutions can be used.
# 3rd field is an optional message to print with PASS/FAIL.
#

set tests {
    { {--help} "USAGE:*" "Display help" }
    { {-v -v -v} "Verbose level is 3" "Verbose set correctly" }
    { {-v --tool xXx}
	"Found.*nested-init\..*Loading.*utils\.exp"
	"Loading library files" }
    { {-v --tool xXx}
	"Expect binary is.*Using.*main test driver"
	"Loading basic packages" }
    { {--F --tool x}
	"Illegal Argument \"--F\""
	"Bad argument" }
    { {--tool x}
	"Couldn't find tool init file"
	"Bad tool name" }
    { {-v --target m68k-vxworks}
	"Target is m68k-vxworks"
	"--target option" }
    { {-v --target_board flash}
	"Running target flash"
	"--target_board option" }
    { {-v --host sparc-sun-sunos4.1.9}
	"Native configuration is sparc-sun-sunos4.1.9"
	"--host option" }
    { {-v -a}
	"Print all test output to screen"
	"--all option (short form)" }
    { {-v --all}
	"Print all test output to screen"
	"--all option" }
    { {-v --ignore foo.exp}
	"Ignoring test foo.exp"
	"--ignore option" }
    { {-v --objdir xXx}
	"Using test binaries in xXx.*Testsuite root is"
	"--objdir option" }
    { {-v --tool xXx}
	"Testing xXx"
	"--tool option" }
    { {-v --debug}
	"Expect Debugging is ON"
	"--debug option" }
    { {-v --reboot}
	"Will reboot the target"
	"--reboot option" }
    { {-v --strace 1}
	"Source Trace level is now 1.* 1  if"
	"--strace option" }
    { {-v --D0}
	"Tcl debugger is ON"
	"--D0 option" }
    { {-V}
	"DejaGnu version.*Expect version.*Tcl version.*"
	"-V option" }
    { {--version}
	"DejaGnu version.*Expect version.*Tcl version.*"
	"--version option" }
    { {-v --xml}
	"XML logging turned on"
	"--xml option" }
}

foreach t $tests {
    if [util_test $RUNTEST \
	    "[lindex $t 0] --local_init nested-init.exp --tool null" \
	    "" \
	    "[lindex $t 1]"] {
	fail "[lindex $t 2]"
    } else {
	pass "[lindex $t 2]"
    }
}

runtest_cleanup_nested_testsuite