The output of the library mismatch tests should check for contains of expected gold output instead of equals to prevent false positive failures related to IR validation warnings.
This commit is contained in:
committed by
Pavel Punegov
parent
a4407e69f7
commit
10bb0a361c
@@ -3726,7 +3726,12 @@ task library_mismatch(type: KonanDriverTest) {
|
||||
"warning: skipping $dir/1.2/empty.klib. The library versions don't match. Expected '5.6', found '1.2'\n" +
|
||||
"warning: skipping $dir/3.4/empty.klib. The target doesn't match. Expected '$currentTarget', found [$someOtherTarget]\n" +
|
||||
"Hello, versioned world!\n"
|
||||
goldValue = isWindows() ? messages.replaceAll('\\/', '\\\\') : messages
|
||||
goldValue = PlatformInfo.isWindows() ? messages.replaceAll('\\/', '\\\\') : messages
|
||||
outputChecker = { out ->
|
||||
goldValue.split("\n")
|
||||
.collect { line -> out.contains(line) }
|
||||
.every { it == true }
|
||||
}
|
||||
}
|
||||
|
||||
task library_ir_provider_mismatch(type: KonanDriverTest) {
|
||||
@@ -3749,7 +3754,12 @@ task library_ir_provider_mismatch(type: KonanDriverTest) {
|
||||
def messages =
|
||||
"warning: skipping $dir/unsupported_ir_provider/empty.klib. The library requires unknown IR provider UNSUPPORTED.\n" +
|
||||
"hello\n"
|
||||
goldValue = isWindows() ? messages.replaceAll('\\/', '\\\\') : messages
|
||||
goldValue = PlatformInfo.isWindows() ? messages.replaceAll('\\/', '\\\\') : messages
|
||||
outputChecker = { out ->
|
||||
goldValue.split("\n")
|
||||
.collect { line -> out.contains(line) }
|
||||
.every { it == true }
|
||||
}
|
||||
}
|
||||
|
||||
if (isAppleTarget(project)) {
|
||||
|
||||
Reference in New Issue
Block a user