Skip to content

Remove unneeded LLVM CI test assertions - #139015

Merged
bors merged 1 commit into
rust-lang:masterfrom
Kobzol:llvm-ci-test-fixes
Mar 27, 2025
Merged

Remove unneeded LLVM CI test assertions#139015
bors merged 1 commit into
rust-lang:masterfrom
Kobzol:llvm-ci-test-fixes

Conversation

@Kobzol

Copy link
Copy Markdown
Member

The download_ci_llvm bootstrap test was checking implementation details of the LLVM CI download check, which isn't very useful. It was essentially testing "if function_that_checks_if_llvm_ci_is_available returns true, we enable CI LLVM", but the usage of the function was an implementation detail. After #138704, the inner implementation has changed, so the test now breaks if LLVM is updated.

I don't think that it's very useful to test implementation details like this, without taking the outside git state into account. Ideally, we should mock the git state for the test, otherwise the test will randomly break when executed in environments which the test does not control (e.g. on CI when a LLVM change happens).

I only kept the part of the test that checks that LLVM CI isn't used when we specify download-ci-llvm = false, as that should hold under all conditions, CI/local, and all git states.

I also kept the if-unchanged assertion, but only on CI, and as a temporary measure. After #138591, we should have a proper way of mocking the git state to make the test robust, and make it test what we actually want.

Fixesthis.

r? @ghost

@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Mar 27, 2025
@Kobzol
Kobzolforce-pushed the llvm-ci-test-fixes branch from f0e0183 to 215c2c2CompareMarch 27, 2025 11:53
@Kobzol
Kobzol marked this pull request as ready for review March 27, 2025 11:53
@rustbot

Copy link
Copy Markdown
Collaborator

This PR modifies src/bootstrap/src/core/config.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

@Kobzol

Copy link
Copy Markdown
MemberAuthor

CI succeeded with a WIP commit that modified download-ci-llvm-stamp.

r? @onur-ozkan

@onur-ozkan

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Mar 27, 2025

Copy link
Copy Markdown
Collaborator

📌 Commit 215c2c2 has been approved by onur-ozkan

It is now in the queue for this repository.

@borsbors 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-review Status: Awaiting review from the assignee but also interested parties. labels Mar 27, 2025
@jhprattjhpratt mentioned this pull request Mar 27, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 27, 2025
Rollup of 7 pull requests
Successful merges:
- rust-lang#138844 (expand: Leave traces when expanding `cfg` attributes)
- rust-lang#138926 (Remove `kw::Empty` uses from `rustc_middle`.)
- rust-lang#138989 (Clean up a few things in rustc_hir_analysis::check::region)
- rust-lang#138999 (Report compiletest pass mode if forced)
- rust-lang#139014 (Improve suggest construct with literal syntax instead of calling)
- rust-lang#139015 (Remove unneeded LLVM CI test assertions)
- rust-lang#139016 (Add job duration changes to post-merge analysis report)
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit ecaa35f into rust-lang:masterMar 27, 2025
@rustbotrustbot added this to the 1.87.0 milestone Mar 27, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 27, 2025
Rollup merge of rust-lang#139015 - Kobzol:llvm-ci-test-fixes, r=onur-ozkan
Remove unneeded LLVM CI test assertions
The `download_ci_llvm` bootstrap test was checking implementation details of the LLVM CI download check, which isn't very useful. It was essentially testing "if function_that_checks_if_llvm_ci_is_available returns true, we enable CI LLVM", but the usage of the function was an implementation detail. After rust-lang#138704, the inner implementation has changed, so the test now breaks if LLVM is updated.
I don't think that it's very useful to test implementation details like this, without taking the outside git state into account. Ideally, we should mock the git state for the test, otherwise the test will randomly break when executed in environments which the test does not control (e.g. on CI when a LLVM change happens).
I only kept the part of the test that checks that LLVM CI isn't used when we specify `download-ci-llvm = false`, as that should hold under all conditions, CI/local, and all git states.
I also kept the `if-unchanged` assertion, but only on CI, and as a temporary measure. After rust-lang#138591, we should have a proper way of mocking the git state to make the test robust, and make it test what we actually want.
Fixes [this](rust-lang#138784 (comment)).
r? `@ghost`
@Kobzol
Kobzol deleted the llvm-ci-test-fixes branch March 28, 2025 06:51
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@Kobzol@rustbot@onur-ozkan@bors