Skip to content

Conversation

@ramonasuncion
Copy link
Member

@ramonasuncion ramonasuncion commented Oct 3, 2025

Partially address #84407

@ramonasuncion ramonasuncion requested a review from a team as a code owner October 3, 2025 17:31
@hnrklssn
Copy link
Member

hnrklssn commented Oct 3, 2025

@swift-ci please smoke test

// 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
Copy link
Member

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.

Copy link
Member

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.

Copy link
Member Author

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?

Copy link
Member

@hnrklssn hnrklssn Oct 8, 2025

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.


// FIXME: https://github.com/apple/swift/issues/52252
// Disable because it blocks PR testing.
// UNSUPPORTED: CPU=i386
Copy link
Member

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.
@hnrklssn
Copy link
Member

hnrklssn commented Oct 4, 2025

@swift-ci please smoke test

@hnrklssn
Copy link
Member

@swift-ci please smoke test

@hnrklssn
Copy link
Member

@swift-ci please smoke test windows platform

@hnrklssn hnrklssn merged commit 8320cba into swiftlang:main Oct 16, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants