10
10
11
11
extern crate test;
12
12
13
- use crate :: common:: { output_base_dir, output_relative_path, PanicStrategy } ;
13
+ use crate :: common:: { output_base_dir, output_relative_path} ;
14
14
use crate :: common:: { Config , Mode , TestPaths } ;
15
15
use crate :: util:: { logv, top_level} ;
16
16
use getopts:: Options ;
@@ -57,19 +57,7 @@ fn add_kani_to_path() {
57
57
58
58
pub fn parse_config ( args : Vec < String > ) -> Config {
59
59
let mut opts = Options :: new ( ) ;
60
- opts. optopt ( "" , "compile-lib-path" , "path to host shared libraries" , "PATH" )
61
- . optopt ( "" , "run-lib-path" , "path to target shared libraries" , "PATH" )
62
- . optopt ( "" , "rustc-path" , "path to rustc to use for compiling" , "PATH" )
63
- . optopt ( "" , "kani-dir-path" , "path to directory where kani is located" , "PATH" )
64
- . optopt ( "" , "rustdoc-path" , "path to rustdoc to use for compiling" , "PATH" )
65
- . optopt ( "" , "rust-demangler-path" , "path to rust-demangler to use in tests" , "PATH" )
66
- . optopt ( "" , "lldb-python" , "path to python to use for doc tests" , "PATH" )
67
- . optopt ( "" , "docck-python" , "path to python to use for doc tests" , "PATH" )
68
- . optopt ( "" , "jsondocck-path" , "path to jsondocck to use for doc tests" , "PATH" )
69
- . optopt ( "" , "valgrind-path" , "path to Valgrind executable for Valgrind tests" , "PROGRAM" )
70
- . optflag ( "" , "force-valgrind" , "fail if Valgrind tests cannot be run under Valgrind" )
71
- . optopt ( "" , "run-clang-based-tests-with" , "path to Clang executable" , "PATH" )
72
- . optopt ( "" , "llvm-filecheck" , "path to LLVM's FileCheck binary" , "DIR" )
60
+ opts
73
61
. optopt ( "" , "src-base" , "directory to scan for test files" , "PATH" )
74
62
. optopt ( "" , "build-base" , "directory to deposit test outputs" , "PATH" )
75
63
. optopt (
@@ -85,67 +73,14 @@ pub fn parse_config(args: Vec<String>) -> Config {
85
73
"which suite of compile tests to run. used for nicer error reporting." ,
86
74
"SUITE" ,
87
75
)
88
- . optopt (
89
- "" ,
90
- "pass" ,
91
- "force {check,build,run}-pass tests to this mode." ,
92
- "check | build | run" ,
93
- )
94
- . optopt ( "" , "run" , "whether to execute run-* tests" , "auto | always | never" )
95
76
. optflag ( "" , "ignored" , "run tests marked as ignored" )
96
77
. optflag ( "" , "exact" , "filters match exactly" )
97
- . optopt (
98
- "" ,
99
- "runtool" ,
100
- "supervisor program to run tests under \
101
- (eg. emulator, valgrind)",
102
- "PROGRAM" ,
103
- )
104
- . optmulti ( "" , "host-rustcflags" , "flags to pass to rustc for host" , "FLAGS" )
105
- . optmulti ( "" , "target-rustcflags" , "flags to pass to rustc for target" , "FLAGS" )
106
- . optopt ( "" , "target-panic" , "what panic strategy the target supports" , "unwind | abort" )
107
78
. optflag ( "" , "verbose" , "run tests verbosely, showing all output" )
108
- . optflag (
109
- "" ,
110
- "bless" ,
111
- "overwrite stderr/stdout files instead of complaining about a mismatch" ,
112
- )
113
79
. optflag ( "" , "quiet" , "print one character per test instead of one line" )
114
80
. optopt ( "" , "color" , "coloring: auto, always, never" , "WHEN" )
115
81
. optopt ( "" , "logfile" , "file to log test execution to" , "FILE" )
116
82
. optopt ( "" , "target" , "the target to build for" , "TARGET" )
117
83
. optopt ( "" , "host" , "the host to build for" , "HOST" )
118
- . optopt ( "" , "cdb" , "path to CDB to use for CDB debuginfo tests" , "PATH" )
119
- . optopt ( "" , "gdb" , "path to GDB to use for GDB debuginfo tests" , "PATH" )
120
- . optopt ( "" , "lldb-version" , "the version of LLDB used" , "VERSION STRING" )
121
- . optopt ( "" , "llvm-version" , "the version of LLVM used" , "VERSION STRING" )
122
- . optflag ( "" , "system-llvm" , "is LLVM the system LLVM" )
123
- . optopt ( "" , "android-cross-path" , "Android NDK standalone path" , "PATH" )
124
- . optopt ( "" , "adb-path" , "path to the android debugger" , "PATH" )
125
- . optopt ( "" , "adb-test-dir" , "path to tests for the android debugger" , "PATH" )
126
- . optopt ( "" , "lldb-python-dir" , "directory containing LLDB's python module" , "PATH" )
127
- . optopt ( "" , "cc" , "path to a C compiler" , "PATH" )
128
- . optopt ( "" , "cxx" , "path to a C++ compiler" , "PATH" )
129
- . optopt ( "" , "cflags" , "flags for the C compiler" , "FLAGS" )
130
- . optopt ( "" , "ar" , "path to an archiver" , "PATH" )
131
- . optopt ( "" , "linker" , "path to a linker" , "PATH" )
132
- . optopt ( "" , "llvm-components" , "list of LLVM components built in" , "LIST" )
133
- . optopt ( "" , "llvm-bin-dir" , "Path to LLVM's `bin` directory" , "PATH" )
134
- . optopt ( "" , "nodejs" , "the name of nodejs" , "PATH" )
135
- . optopt ( "" , "npm" , "the name of npm" , "PATH" )
136
- . optopt ( "" , "remote-test-client" , "path to the remote test client" , "PATH" )
137
- . optopt (
138
- "" ,
139
- "compare-mode" ,
140
- "mode describing what file the actual ui output will be compared to" ,
141
- "COMPARE MODE" ,
142
- )
143
- . optflag (
144
- "" ,
145
- "rustfix-coverage" ,
146
- "enable this to generate a Rustfix coverage file, which is saved in \
147
- `./<build_base>/rustfix_missing_coverage.txt`",
148
- )
149
84
. optflag ( "" , "force-rerun" , "rerun tests even if the inputs are unchanged" )
150
85
. optflag ( "h" , "help" , "show this message" )
151
86
. optopt ( "" , "edition" , "default Rust edition" , "EDITION" ) ;
@@ -197,7 +132,6 @@ pub fn parse_config(args: Vec<String>) -> Config {
197
132
let mode = matches. opt_str ( "mode" ) . unwrap ( ) . parse ( ) . expect ( "invalid mode" ) ;
198
133
199
134
Config {
200
- kani_dir_path : opt_path ( matches, "kani-dir-path" , & [ "target/debug" ] ) ,
201
135
src_base,
202
136
build_base : opt_path ( matches, "build-base" , & [ "build" , "tests" , suite. as_str ( ) ] ) ,
203
137
mode,
@@ -206,20 +140,12 @@ pub fn parse_config(args: Vec<String>) -> Config {
206
140
filters : matches. free . clone ( ) ,
207
141
filter_exact : matches. opt_present ( "exact" ) ,
208
142
logfile : matches. opt_str ( "logfile" ) . map ( |s| PathBuf :: from ( & s) ) ,
209
- host_rustcflags : Some ( matches. opt_strs ( "host-rustcflags" ) . join ( " " ) ) ,
210
- target_rustcflags : Some ( matches. opt_strs ( "target-rustcflags" ) . join ( " " ) ) ,
211
- target_panic : match matches. opt_str ( "target-panic" ) . as_deref ( ) {
212
- Some ( "unwind" ) | None => PanicStrategy :: Unwind ,
213
- Some ( "abort" ) => PanicStrategy :: Abort ,
214
- _ => panic ! ( "unknown `--target-panic` option `{}` given" , mode) ,
215
- } ,
216
143
target,
217
144
host : opt_str2 ( matches. opt_str ( "host" ) ) ,
218
145
verbose : matches. opt_present ( "verbose" ) ,
219
146
quiet : matches. opt_present ( "quiet" ) ,
220
147
color,
221
148
edition : matches. opt_str ( "edition" ) ,
222
-
223
149
force_rerun : matches. opt_present ( "force-rerun" ) ,
224
150
mir_linker : cfg ! ( mir_linker) ,
225
151
}
@@ -234,8 +160,6 @@ pub fn log_config(config: &Config) {
234
160
logv ( c, format ! ( "run_ignored: {}" , config. run_ignored) ) ;
235
161
logv ( c, format ! ( "filters: {:?}" , config. filters) ) ;
236
162
logv ( c, format ! ( "filter_exact: {}" , config. filter_exact) ) ;
237
- logv ( c, format ! ( "host-rustcflags: {}" , opt_str( & config. host_rustcflags) ) ) ;
238
- logv ( c, format ! ( "target-rustcflags: {}" , opt_str( & config. target_rustcflags) ) ) ;
239
163
logv ( c, format ! ( "target: {}" , config. target) ) ;
240
164
logv ( c, format ! ( "host: {}" , config. host) ) ;
241
165
logv ( c, format ! ( "verbose: {}" , config. verbose) ) ;
0 commit comments