-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Test rust-analyzer in CI #99444
Test rust-analyzer in CI #99444
Conversation
This adds support for testing `rust-analyzer` in-tree.
(rust-highfive has picked a reviewer for you, use r? to override) |
However, the tests are failing locally for me in-tree, and I don't know why. I'm aware of the proc-macro bridge issues due to nightly changes, but even with |
If the whole testsuite is infeasible, we could also narrow it -- e.g.
|
I'm able to reproduce the failures when checking out your branch. Those tests use
$ clear; strace -e open,openat -ff cargo t test_string_highlighting
(lots of output omitted)
[pid 38722] openat(AT_FDCWD, "/home/amos/bearcove/rust/crates/ide/src/syntax_highlighting/./test_data/highlight_strings.html", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) Indeed that file doesn't exist: $ stat /home/amos/bearcove/rust/crates/ide/src/syntax_highlighting/./test_data/highlight_strings.html
stat: cannot statx '/home/amos/bearcove/rust/crates/ide/src/syntax_highlighting/./test_data/highlight_strings.html': No such file or directory The correct path is as follows: $ stat /home/amos/bearcove/rust/src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/./test_data/highlight_strings.html
File: /home/amos/bearcove/rust/src/tools/rust-analyzer/crates/ide/src/syntax_highlighting/./test_data/highlight_strings.html
Size: 45127 Blocks: 96 IO Block: 4096 regular file
Device: 803h/2051d Inode: 16409270 Links: 1
Access: (0664/-rw-rw-r--) Uid: ( 1000/ amos) Gid: ( 1000/ amos)
Access: 2022-07-18 13:45:36.999588514 +0200
Modify: 2022-07-18 13:44:44.295860084 +0200
Change: 2022-07-18 13:44:44.295860084 +0200
Birth: 2022-07-18 13:44:44.295860084 +0200 That feels like a bug in expect-test. It uses the |
Upgrade to expect-test@1.4.0, add CARGO_WORKSPACE_DIR env var This should make ra's test suite runnable from within `rust-analyzer/rust`. `@cuviper` ran into that when trying to run RA tests from rust CI: rust-lang/rust#99444 (comment)
This bumps `expect-test` to 1.4.0, which is required for tests to pass from the `rust-lang/rust` repo cf. rust-lang#99444
@cuviper I opened a PR against your PR to also bump the |
So, this is enough to make The alternative there is to set |
I updated this PR to set |
This adds support for testing `rust-analyzer` in-tree. Test rust-analyzer in CI Set CARGO_WORKSPACE_DIR directly in `prepare_tool_cargo` cf. rust-lang#99444 (comment) cf. rust-analyzer/expect-test#33 Various x.py changes for Submodule => InTree, and removing toolstate Introduce `rust-analyzer/in-rust-tree` cargo feature This allows skipping ra's "check_merge_commits" test for now. Later, it might be used to link against `extern proc_macro` directly, cf. rust-lang/rust-analyzer#12803 More cleanups around the RustAnalyzer tool in bootstrap Start fixing lints Deny the same warnings x.py does in all RA crates Warn on x.py warnings, don't deny cf. https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frust-analyzer/topic/rust-analyzer.20as.20a.20subtree.3A.20experimental.20PR.20status/near/290114101 Fix rust_2018_idioms with cargo fix Add warning groups for more RA crates Fix more 2015 idioms (with 2018_idioms, naming is fun) RA passes all x.py warnings Fix formatting after fixing idioms/additional warnings Enable in-rust-tree feature, RA tests pass Print stdout+stderr when nested cargo invocation fails
This adds
x.py
support for testingrust-analyzer
in-tree, and runsthat in CI for
x86_64-gnu-tools
so we can track toolstate.