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

x test compiler/rustc_codegen_{cranelift,gcc} is not supported #95518

Open
jyn514 opened this issue Mar 31, 2022 · 8 comments
Open

x test compiler/rustc_codegen_{cranelift,gcc} is not supported #95518

jyn514 opened this issue Mar 31, 2022 · 8 comments
Labels
A-codegen Area: Code generation A-cranelift Things relevant to the [future] cranelift backend A-gcc Things relevant to the [future] GCC backend A-testsuite Area: The testsuite used to check the correctness of rustc S-blocked Status: Blocked on something else such as an RFC or other implementation work. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@jyn514
Copy link
Member

jyn514 commented Mar 31, 2022

thread 'main' panicked at 'error: no rules matched compiler/rustc_codegen_cranelift', src/bootstrap/builder.rs:286:17
thread 'main' panicked at 'error: no rules matched compiler/rustc_codegen_gcc', src/bootstrap/builder.rs:286:17

cc @bjorn3 @antoyo - are there any tests for these crates that make sense in-tree? I first noticed this because it means x test compiler/* breaks, but if that's something I have to live with I can, it would just be nice for it to work.

@rustbot label: +A-rustbuild +A-codegen

@rustbot rustbot added A-codegen Area: Code generation T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Mar 31, 2022
@bjorn3
Copy link
Member

bjorn3 commented Mar 31, 2022

For cg_clif there are tests that make sense in-tree I think. However I want to first rewrite my test code from shell scripts to rust before wiring it up to rustbuild. Also I'm not quite sure yet how to actually run the tests when cg_clif is built using rustbuild rather than cg_clif's own build system (which duplicates some of the functionality of rustbuild).

@jyn514
Copy link
Member Author

jyn514 commented Mar 31, 2022

Sounds good :) I'm happy to help with the "wire it up to rustbuild" part.

@jyn514
Copy link
Member Author

jyn514 commented Apr 13, 2022

@rustbot label +S-blocked

(waiting for bjorn3 to rewrite his shell scripts before spending too much time on this)

@rustbot rustbot added the S-blocked Status: Blocked on something else such as an RFC or other implementation work. label Apr 13, 2022
@jyn514
Copy link
Member Author

jyn514 commented Aug 1, 2022

@antoyo what are your thoughts on running test.sh in-tree? I ran prepare.sh and test.sh locally - looks like there's not too much to modify.

  • use the sysroot built from source instead of rust-toolchain (not too hard, I can help)
  • install hyperfine to the build/ directory instead of globally (very easy; we can do this only when RUSTC_BOOTSTRAP is set to avoid breaking any of your workflows)
  • download your fork of gcc and set it in gcc_path. we might need to change the shell scripts to allow configuring where gcc_path is; or maybe just add it to .gitignore.

@antoyo
Copy link
Contributor

antoyo commented Aug 2, 2022

@jyn514 That sounds good to me. The hyperfine stuff is not currently ran and should probably be skipped for in-tree testing.

Would that be simpler to use upstream GCC 12 instead of compiling GCC? That could be an option (of course, less tests would pass, but that would still be useful).

@jyn514
Copy link
Member Author

jyn514 commented Aug 24, 2022

Would that be simpler to use upstream GCC 12 instead of compiling GCC? That could be an option (of course, less tests would pass, but that would still be useful).

Yes, that would be super helpful to cut down on compile times :) Are there a known set of tests that fail, that we can manually exclude? Or can the failed tests change as you improve cg_gcc? If the latter than we might want to still build GCC from source so we have reliable tests.

@bjorn3
Copy link
Member

bjorn3 commented Aug 24, 2022

Are there a known set of tests that fail, that we can manually exclude?

https://github.com/rust-lang/rustc_codegen_gcc/blob/master/failing-ui-tests12.txt is appended to the list of known failed tests in failing-ui-tests.txt on CI when testing with GCC 12.

@antoyo
Copy link
Contributor

antoyo commented Aug 24, 2022

Or can the failed tests change as you improve cg_gcc?

In both cases, the failed tests can change, but the files pointed by bjorn3 will be updated accordingly.

@jyn514 jyn514 added the A-testsuite Area: The testsuite used to check the correctness of rustc label May 8, 2023
bors added a commit to rust-lang-ci/rust that referenced this issue Sep 10, 2023
…imulacrum

Run part of cg_clif's tests in CI

While currently cg_clif is already built in CI ensuring that it always compiles, sometimes there is a bug in the changes that were made causing tests to fail. This PR is one step towards preventing this.

Part of the test suite is still skipped until vendoring for the projects that are being tested is implemented. I will implement that in a future PR.

Fixes part of https://github.com/bjorn3/rustc_codegen_cranelift/issues/1290
Fixes part of rust-lang#95518
Required for rust-lang#81746
@bjorn3 bjorn3 added A-cranelift Things relevant to the [future] cranelift backend A-gcc Things relevant to the [future] GCC backend labels Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-codegen Area: Code generation A-cranelift Things relevant to the [future] cranelift backend A-gcc Things relevant to the [future] GCC backend A-testsuite Area: The testsuite used to check the correctness of rustc S-blocked Status: Blocked on something else such as an RFC or other implementation work. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

No branches or pull requests

4 participants