-
Notifications
You must be signed in to change notification settings - Fork 10.6k
[Test][stdlib] Update KVOKeyPaths.swift to use --check-prefixes #84671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Test][stdlib] Update KVOKeyPaths.swift to use --check-prefixes #84671
Conversation
|
@swift-ci please smoke test |
test/stdlib/KVOKeyPaths.swift
Outdated
| // RUN: %target-codesign %t/a.out | ||
| // RUN: %target-run %t/a.out | grep 'check-prefix' > %t/prefix-option | ||
| // RUN: %target-run %t/a.out | %FileCheck -check-prefix=CHECK `cat %t/prefix-option` %s | ||
| // RUN: %target-run %t/a.out | %FileCheck --check-prefixes=CHECK,CHECK-51,DONT-CHECK %s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CHECK-51 is only expected to find matches when run against Swift 5.1 and later, so we still need to conditionalise that. I think we can do that using something like this however:
// RUN: export CHECK_PREFIX=%target-run %t/a.out | grep 'check-prefix'
// RUN: %target-run %t/a.out | %FileCheck -check-prefix=CHECK $CHECK_PREFIX %s
It also looks to me like we don't actually need the DONT-CHECK prefix, since we always use the CHECK prefix, so that can probably be removed. I could be wrong on that point though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah but if there's no match against 'check-prefix' then grep will probably return a failing status code, so probably best to keep it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’ve been a bit stumped trying to use export as suggested. It says it "cannot be part of a pipeline." Do you have any suggestions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see, then perhaps this could work:
// RUN: %target-run %t/a.out > %t/output.txt
// RUN: %FileCheck %s < %t/output.txt
// RUN: grep "check-prefix=CHECK-51" %t/output.txt && %FileCheck %s --check-prefix=CHECK-51 < %t/output.txt
With this approach I think we should be able to remove all mentions of DONT-CHECK also.
test/stdlib/KVOKeyPaths.swift
Outdated
|
|
||
| // FIXME: https://github.com/apple/swift/issues/52252 | ||
| // Disable because it blocks PR testing. | ||
| // UNSUPPORTED: CPU=i386 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the linked issue, it seems like the problem that caused this has been resolved. We should remove this to make sure that CI runs this test.
The test was disabled on i386 because of swiftlang#52252. That bug is fixed, so the comments can be removed.
|
@swift-ci please smoke test |
|
@swift-ci please smoke test |
|
@swift-ci please smoke test windows platform |
Partially address #84407