@@ -17,11 +17,15 @@ const HELP: &str = "\
17
17
Usage: xtask <COMMAND>
18
18
19
19
Commands:
20
- cts [--skip-checkout ] [<test selector> | -f <test list file>] ...
20
+ cts [<options> ] [<test selector... > | -f <test list file...> | -- <args ...>]
21
21
Check out, build, and run CTS tests
22
22
23
- --skip-checkout Don't check out the pinned CTS version, use whatever is
24
- already checked out.
23
+ --skip-checkout Don't check out the pinned CTS version, use whatever
24
+ is already checked out.
25
+ --release Build and run in release mode
26
+ --llvm-cov Run with LLVM code coverage
27
+ --backend <backend> Specify the backend (metal, dx12, or vulkan). Used
28
+ to evaluate `fails-if` conditions in the test list.
25
29
26
30
run-wasm
27
31
Build and run web examples
@@ -75,7 +79,12 @@ fn main() -> anyhow::Result<ExitCode> {
75
79
. format_indent ( Some ( 0 ) )
76
80
. init ( ) ;
77
81
78
- let mut args = Arguments :: from_env ( ) ;
82
+ let mut args = std:: env:: args_os ( ) . skip ( 1 ) . collect :: < Vec < _ > > ( ) ;
83
+ let passthrough_args = args
84
+ . iter ( )
85
+ . position ( |arg| arg == "--" )
86
+ . map ( |pos| args. drain ( pos..) . skip ( 1 ) . collect ( ) ) ;
87
+ let mut args = Arguments :: from_vec ( args) ;
79
88
80
89
if args. contains ( [ "-h" , "--help" ] ) {
81
90
eprint ! ( "{HELP}" ) ;
@@ -92,10 +101,10 @@ fn main() -> anyhow::Result<ExitCode> {
92
101
shell. change_dir ( String :: from ( env ! ( "CARGO_MANIFEST_DIR" ) ) + "/.." ) ;
93
102
94
103
match subcommand. as_deref ( ) {
95
- Some ( "cts" ) => cts:: run_cts ( shell, args) ?,
96
- Some ( "run-wasm" ) => run_wasm:: run_wasm ( shell, args) ?,
104
+ Some ( "cts" ) => cts:: run_cts ( shell, args, passthrough_args ) ?,
105
+ Some ( "run-wasm" ) => run_wasm:: run_wasm ( shell, args, passthrough_args ) ?,
97
106
Some ( "miri" ) => miri:: run_miri ( shell, args) ?,
98
- Some ( "test" ) => test:: run_tests ( shell, args) ?,
107
+ Some ( "test" ) => test:: run_tests ( shell, args, passthrough_args ) ?,
99
108
Some ( "vendor-web-sys" ) => vendor_web_sys:: run_vendor_web_sys ( shell, args) ?,
100
109
Some ( subcommand) => {
101
110
bad_arguments ! ( "Unknown subcommand: {}" , subcommand)
0 commit comments