File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,12 +50,6 @@ const CTS_GIT_URL: &str = "https://github.com/gpuweb/cts.git";
5050/// Path to default CTS test list.
5151const CTS_DEFAULT_TEST_LIST : & str = "cts_runner/test.lst" ;
5252
53- static TEST_LINE_REGEX : LazyLock < Regex > = LazyLock :: new ( || {
54- RegexBuilder :: new ( r#"(?:fails-if\s*\(\s*(?<fails_if>\w+)\s*\)\s+)?(?<selector>.*)"# )
55- . build ( )
56- . unwrap ( )
57- } ) ;
58-
5953#[ derive( Default ) ]
6054struct TestLine {
6155 pub selector : OsString ,
@@ -103,6 +97,12 @@ pub fn run_cts(
10397
10498 for file in list_files {
10599 tests. extend ( shell. read_file ( file) ?. lines ( ) . filter_map ( |line| {
100+ static TEST_LINE_REGEX : LazyLock < Regex > = LazyLock :: new ( || {
101+ RegexBuilder :: new ( r#"(?:fails-if\s*\(\s*(?<fails_if>\w+)\s*\)\s+)?(?<selector>.*)"# )
102+ . build ( )
103+ . unwrap ( )
104+ } ) ;
105+
106106 let trimmed = line. trim ( ) ;
107107 let is_comment = trimmed. starts_with ( "//" ) || trimmed. starts_with ( "#" ) ;
108108 let captures = TEST_LINE_REGEX
You can’t perform that action at this time.
0 commit comments