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

Move `compile-pass` tests to `check-pass` or `build-pass` #62277

Open
cramertj opened this issue Jul 1, 2019 · 4 comments

Comments

@cramertj
Copy link
Member

commented Jul 1, 2019

compile-pass was the old way to assert that UI tests were able to successfully build. However, it would do a full build of the code, including codegen and linking. Many of our tests don't need this, however, and should instead use the new check-pass, introduced in #61778. For tests that exercise codegen and linking, build-pass can be used instead.

As a first step, it would be good to remove compile-pass to prevent users adding new tests that unconsciously take a dependency on codegen/linking, and push them to use check/build-pass to make the distinction explicit.

To do this, we'd like to start with a mass migration of compile-pass tests to build-pass (rather than check-pass because we don't want to accidentally stop testing codegen/linking functionality). However, we don't want to lose the distinction between tests which are intentionally build-pass and those that have been automatically migrated, so automatically-migrated tests should include a note like // build-pass (FIXME(this-issue-#): could be check-pass?) or similar.

Once that's done, we can remove compile-pass and work on moving over the FIXME-tagged tests to either check-pass or remove the FIXME.

@Centril

This comment has been minimized.

Copy link
Member

commented Jul 1, 2019

  • Mass migrate // compile-pass annotations to // build-pass (FIXME(62277): could be check-pass?).

  • Remove // compile-pass from compiletest.

  • Triage // build-pass annotations re. whether they should be // check-pass.

@Centril

This comment has been minimized.

Copy link
Member

commented Jul 1, 2019

Centril added a commit to Centril/rust that referenced this issue Jul 3, 2019
Rollup merge of rust-lang#62317 - JohnTitor:move-tests-to-build-pass,…
… r=Centril

Migrate `compile-pass` annotations to `build-pass`

This is a part of rust-lang#62277.

As a first step, the `compile-pass` tests are migrated to `build-pass`.

r? @cramertj
cc @Centril
Centril added a commit to Centril/rust that referenced this issue Jul 3, 2019
Rollup merge of rust-lang#62317 - JohnTitor:move-tests-to-build-pass,…
… r=Centril

Migrate `compile-pass` annotations to `build-pass`

This is a part of rust-lang#62277.

As a first step, the `compile-pass` tests are migrated to `build-pass`.

r? @cramertj
cc @Centril
Centril added a commit to Centril/rust that referenced this issue Jul 3, 2019
Rollup merge of rust-lang#62317 - JohnTitor:move-tests-to-build-pass,…
… r=Centril

Migrate `compile-pass` annotations to `build-pass`

This is a part of rust-lang#62277.

As a first step, the `compile-pass` tests are migrated to `build-pass`.

r? @cramertj
cc @Centril
Centril added a commit to Centril/rust that referenced this issue Jul 3, 2019
Rollup merge of rust-lang#62317 - JohnTitor:move-tests-to-build-pass,…
… r=Centril

Migrate `compile-pass` annotations to `build-pass`

This is a part of rust-lang#62277.

As a first step, the `compile-pass` tests are migrated to `build-pass`.

r? @cramertj
cc @Centril
Centril added a commit to Centril/rust that referenced this issue Jul 5, 2019
Rollup merge of rust-lang#62369 - JohnTitor:remove-compile-pass, r=pe…
…trochenkov

Remove `compile-pass` from compiletest

This is a part of rust-lang#62277.
Removes `compile-pass` from compiletest (and modify some tests' annotations).

r? @Centril
Centril added a commit to Centril/rust that referenced this issue Jul 5, 2019
Rollup merge of rust-lang#62369 - JohnTitor:remove-compile-pass, r=pe…
…trochenkov

Remove `compile-pass` from compiletest

This is a part of rust-lang#62277.
Removes `compile-pass` from compiletest (and modify some tests' annotations).

r? @Centril
Centril added a commit to Centril/rust that referenced this issue Jul 5, 2019
Rollup merge of rust-lang#62369 - JohnTitor:remove-compile-pass, r=pe…
…trochenkov

Remove `compile-pass` from compiletest

This is a part of rust-lang#62277.
Removes `compile-pass` from compiletest (and modify some tests' annotations).

r? @Centril
@monoflo

This comment has been minimized.

Copy link

commented Aug 4, 2019

Hi! I'm willing to take this on, but I'd like to confirm what needs to be done.

With a quick ripgrep, I've seen a ton of references with the following line:

// build-pass (FIXME(62277): could be check-pass?)

Is the goal here to go through each and every one and see what ought to be check-pass as opposed to build-pass in order to speed up testing / CI?

Per #61778 (comment):

// check-pass will compile the test skipping codegen (which is expensive and isn't supposed to fail in most cases).
// build-pass will compile and link the test without running it.
// run-pass will compile, link and run the test.

This seems like a fairly manual job that will require getting pretty familiar with the test codebase.

Where might be the best place to start chipping away at this?

@Centril

This comment has been minimized.

Copy link
Member

commented Aug 6, 2019

@monoflo Basically yeah. The idea is to check whether a particular // build-pass test is just about type checking or whether codegen is relevant. I would just grep for the tests and do a few at a time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.