Skip to content
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

Fix sarif-multi-diagnostic-test.c failure on Windows #987

Merged
merged 1 commit into from
Feb 23, 2021
Merged

Conversation

mgrang
Copy link

@mgrang mgrang commented Feb 23, 2021

Some of the llvm/clang unit tests are non-portable to Windows because they were
mainly written for Linux by the community and somehow made to work on Windows.
The issue with the sarif-multi-diagnostics test seems to be due to grep. Due to
the presence of a Unicode string in this test grep considers this file as a
binary file instead of a text file and hence errors out with the following
message:
Binary file (standard input) matches

So we need to tell grep to treat this file as a text file for comparison
purposes. This can be done via the -a flag to grep. With this fix the test now
passes on ADO. The git log commit messages for the file
clang/test/Analysis/lit.local.cfg which I fixed mentions the non-portable
nature of these tests.

Copy link
Contributor

@kkjeer kkjeer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for fixing this!

@sulekhark
Copy link
Contributor

LGTM. Thank you!

@mgrang mgrang changed the title Fix sarif Fix sarif-multi-diagnostic-test.c failure on Windows Feb 23, 2021
@mgrang mgrang merged commit de9bfcf into master Feb 23, 2021
@mgrang mgrang deleted the sarif branch February 23, 2021 19:25
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