File tree 2 files changed +9
-3
lines changed
src/tools/compiletest/src
2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -1588,12 +1588,12 @@ fn ignore_llvm(config: &Config, line: &str) -> IgnoreDecision {
1588
1588
} else if let Some ( version_string) =
1589
1589
config. parse_name_value_directive ( line, "exact-llvm-major-version" )
1590
1590
{
1591
- // Syntax is "only -llvm-major-version: <version>"
1591
+ // Syntax is "exact -llvm-major-version: <version>"
1592
1592
let version = extract_llvm_version ( & version_string) ;
1593
- if actual_version. major > version . major || actual_version . major < version. major {
1593
+ if actual_version. major != version. major {
1594
1594
return IgnoreDecision :: Ignore {
1595
1595
reason : format ! (
1596
- "ignored when the LLVM major version is {}, but it should be {}" ,
1596
+ "ignored when the actual LLVM major version is {}, but the test only targets major version {}" ,
1597
1597
actual_version. major, version. major
1598
1598
) ,
1599
1599
} ;
Original file line number Diff line number Diff line change @@ -293,6 +293,12 @@ fn llvm_version() {
293
293
294
294
let config: Config = cfg ( ) . llvm_version ( "10.0.0" ) . build ( ) ;
295
295
assert ! ( !check_ignore( & config, "//@ exact-llvm-major-version: 10.0" ) ) ;
296
+
297
+ let config: Config = cfg ( ) . llvm_version ( "10.0.0" ) . build ( ) ;
298
+ assert ! ( !check_ignore( & config, "//@ exact-llvm-major-version: 10" ) ) ;
299
+
300
+ let config: Config = cfg ( ) . llvm_version ( "10.6.2" ) . build ( ) ;
301
+ assert ! ( !check_ignore( & config, "//@ exact-llvm-major-version: 10" ) ) ;
296
302
}
297
303
298
304
#[ test]
You can’t perform that action at this time.
0 commit comments