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 and re-enable two coverage tests on MacOS #78888

Merged
merged 1 commit into from
Nov 13, 2020

Conversation

richkadel
Copy link
Contributor

Note, in the coverage-reports test, the comment about MacOS was wrong.
The setting is based on config.toml llvm optimize setting. There
doesn't appear to be any environment variable I can check, and I
don't think we should add one. Testing the binary itself is a more
reliable way to check anyway.

For the coverage-spanview test, I removed the dependency on sed
altogether, which is much less ugly than trying to work around the
MacOS sed differences.

I tested these changes on Linux, Windows, and Mac.

r? @tmandry
FYI @wesleywiser

@richkadel
Copy link
Contributor Author

r? tmandry

@richkadel
Copy link
Contributor Author

@tmandry - I don't know why rust-highfive is not assigning you (or anyone) as reviewer, but can you take a look?

Thanks!

Comment on lines 16 to +20
# The `llvm-cov show` flag `--debug`, used to generate the `counters` output files, is only enabled
# if LLVM assertions are enabled. Some CI builds disable debug assertions.
ifndef NO_LLVM_ASSERTIONS
# if LLVM assertions are enabled. Requires Rust config `llvm/optimize` and not
# `llvm/release_debuginfo`. Note that some CI builds disable debug assertions (by setting
# `NO_LLVM_ASSERTIONS=1`), so it is not OK to fail the test, but `bless`ed test results cannot be
# generated without debug assertions.
Copy link
Member

Choose a reason for hiding this comment

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

I guess we can consider this like tests which only run on certain platforms, except it only runs in certain configurations. It's not ideal, because if someone makes a large change that affects these tests and isn't in the right configuration, they won't be able to update the tests.

That being said, I'm not sure what we can do differently. I wish there was an LLVM build option to enable only this flag.

One mitigation is to add a warning if someone tries to bless and we can't update all the files. (To keep it from being too noisy.. Maybe only print it if they specify bless and one of the other files doesn't match? This kind of logic is difficult in a Makefile which is another reason I think we should move away from those.)

@tmandry
Copy link
Member

tmandry commented Nov 10, 2020

@bors delegate+

@bors
Copy link
Contributor

bors commented Nov 10, 2020

✌️ @richkadel can now approve this pull request

@tmandry
Copy link
Member

tmandry commented Nov 10, 2020

Actually, this change is an improvement overall, I just wanted you to see my comment :)

@bors r+

@bors
Copy link
Contributor

bors commented Nov 10, 2020

📌 Commit 1e354de0c24c1bb54bf806147d9a42aaec8bda5b has been approved by tmandry

@bors
Copy link
Contributor

bors commented Nov 10, 2020

🌲 The tree is currently closed for pull requests below priority 100, this pull request will be tested once the tree is reopened

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Nov 10, 2020
@bors
Copy link
Contributor

bors commented Nov 12, 2020

⌛ Testing commit 1e354de0c24c1bb54bf806147d9a42aaec8bda5b with merge da3ad56562c56b537887bd8adbb199cd7a0e2bae...

@bors
Copy link
Contributor

bors commented Nov 12, 2020

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 12, 2020
@kennytm
Copy link
Member

kennytm commented Nov 12, 2020

@bors r-

https://github.com/rust-lang-ci/rust/runs/1388536522

tests seems still failing.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 12, 2020
Note, in the coverage-reports test, the comment about MacOS was wrong.
The setting is based on config.toml llvm `optimize` setting. There
doesn't appear to be any environment variable I can check, and I
don't think we should add one. Testing the binary itself is a more
reliable way to check anyway.

For the coverage-spanview test, I removed the dependency on sed
altogether, which is much less ugly than trying to work around the
MacOS sed differences.

I tested these changes on Linux, Windows, and Mac.
@richkadel
Copy link
Contributor Author

Looks like I forgot to prefix llvm-cov with the LLVM_BIN_DIR in the new $(shell...) directive.

@bors r=tmandry

@bors
Copy link
Contributor

bors commented Nov 12, 2020

📌 Commit fe56d26 has been approved by tmandry

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 12, 2020
@richkadel
Copy link
Contributor Author

forgot fmt

@bors r=tmandry rollup=always

@bors
Copy link
Contributor

bors commented Nov 13, 2020

💡 This pull request was already approved, no need to approve it again.

@bors
Copy link
Contributor

bors commented Nov 13, 2020

📌 Commit fe56d26 has been approved by tmandry

@richkadel
Copy link
Contributor Author

@bors r=tmandry rollup-
(sorry, wrong PR)

@bors
Copy link
Contributor

bors commented Nov 13, 2020

💡 This pull request was already approved, no need to approve it again.

@bors
Copy link
Contributor

bors commented Nov 13, 2020

📌 Commit fe56d26 has been approved by tmandry

Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Nov 13, 2020
…andry

Fix and re-enable two coverage tests on MacOS

Note, in the coverage-reports test, the comment about MacOS was wrong.
The setting is based on config.toml llvm `optimize` setting. There
doesn't appear to be any environment variable I can check, and I
don't think we should add one. Testing the binary itself is a more
reliable way to check anyway.

For the coverage-spanview test, I removed the dependency on sed
altogether, which is much less ugly than trying to work around the
MacOS sed differences.

I tested these changes on Linux, Windows, and Mac.

r? `@tmandry`
FYI `@wesleywiser`
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Nov 13, 2020
…andry

Fix and re-enable two coverage tests on MacOS

Note, in the coverage-reports test, the comment about MacOS was wrong.
The setting is based on config.toml llvm `optimize` setting. There
doesn't appear to be any environment variable I can check, and I
don't think we should add one. Testing the binary itself is a more
reliable way to check anyway.

For the coverage-spanview test, I removed the dependency on sed
altogether, which is much less ugly than trying to work around the
MacOS sed differences.

I tested these changes on Linux, Windows, and Mac.

r? ``@tmandry``
FYI ``@wesleywiser``
@bors
Copy link
Contributor

bors commented Nov 13, 2020

⌛ Testing commit fe56d26 with merge 74f7e32...

@bors
Copy link
Contributor

bors commented Nov 13, 2020

☀️ Test successful - checks-actions
Approved by: tmandry
Pushing 74f7e32 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 13, 2020
@bors bors merged commit 74f7e32 into rust-lang:master Nov 13, 2020
@rustbot rustbot added this to the 1.50.0 milestone Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants