Skip to content

Conversation

@gribozavr
Copy link
Contributor

@gribozavr gribozavr commented Aug 11, 2016

This is a cherry-pick of #4187.

Normally I would not propose such a massive change for the branch, but I think that not including this particular change in the branch will make cherry-picking fixes harder. If we don't cherry-pick this change, the master branch prohibits using FileCheck in RUN lines, while swift-3.0-branch does not allow using %FileCheck. I don't think that would be a very good state to be in.


Original description

In the Swift testsuite, FileCheck is used to check for (or for absence of) fixed strings in the input. It is not an issue when the string is long and complex (e.g., a full SIL instruction). But sometimes the string is a common word (e.g., 'sdk' or 'branch'). Tests that use such patterns are known break when the path to the build directory contains these words.

This change makes %FileCheck a lit substitution that replaces paths to source and build directories with fixed strings.

'%FileCheck' removes absolute paths of the source and build directory
from the input.  Overwhelming majority of tests don't intend to match
these paths.

Also add a substitution '%raw-FileCheck' that does not sanitize the
input.
This reverts commit 02039a1.

With the new `%FileCheck` substitution that removess full paths to the
build directory from FileCheck inputs, this workaround is no longer
needed.
@gribozavr
Copy link
Contributor Author

Tests pass locally on macOS. Trying CI.

@gribozavr
Copy link
Contributor Author

@swift-ci Please test

1 similar comment
@gribozavr
Copy link
Contributor Author

@swift-ci Please test

@gribozavr
Copy link
Contributor Author

Linux tests failed because of unrelated reasons, macOS tests passed.

@gribozavr gribozavr added this to the Swift 3.0 milestone Aug 12, 2016
@tkremenek tkremenek merged commit ff1875f into swift-3.0-branch Aug 12, 2016
@gribozavr gribozavr deleted the swift3-FileCheck-substitution branch August 12, 2016 16:09
kateinoigakukun pushed a commit that referenced this pull request Aug 31, 2022
[pull] swiftwasm from main
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.

3 participants