Commit Graph

1074 Commits

Author SHA1 Message Date
许杰友 Jieyou Xu (Joe)
afed862b26 tests: use renamed stdin_buf 2024-09-05 08:43:38 +00:00
Matthias Krüger
5c3370d684
Rollup merge of #129837 - aDotInTheVoid:test-better-json, r=jieyouxu
Actually parse stdout json, instead of using hacky contains logic.

Fixes up the test added in #128963, to actually parse the stdout to JSON, instead of just checking that it contains `{"`.

CC ``@GuillaumeGomez``

r? ``@jieyouxu``
2024-09-02 04:19:30 +02:00
Alona Enraght-Moony
f78979e687 Actually parse stdout json, instead of using hacky contains logic. 2024-08-31 22:08:38 +00:00
Matthias Krüger
d354d4ddd7
Rollup merge of #129605 - jieyouxu:needs-llvm-components, r=Mark-Simulacrum
Add missing `needs-llvm-components` directives for run-make tests that need target-specific codegen

Without suitable `needs-llvm-components` directives, some run-make tests exercising target-specific codegen can fail if the LLVM used is built without the necessary components. Currently, the list is:

```
tests\run-make\print-target-list
tests\run-make\print-to-output
tests\run-make\print-cfg
tests\run-make\target-without-atomic-cas
```

This PR also skips tidy checks for revisions and `needs-llvm-components` for run-make tests since revisions are not supported.

Fixes #129390.
Fixes #127895.

cc ``@petrochenkov`` who noticed this, thanks! Would be great if you could confirm that this fixes the test errors for you locally.
2024-08-31 20:36:23 +02:00
Matthias Krüger
9f3ce40718
Rollup merge of #129366 - petrochenkov:libsearch, r=jieyouxu
linker: Synchronize native library search in rustc and linker

Also search for static libraries with alternative naming (`libname.a`) on MSVC when producing executables or dynamic libraries, and not just rlibs.

This unblocks https://github.com/rust-lang/rust/pull/123436.

try-job: x86_64-msvc
2024-08-31 10:08:53 +02:00
Oneirical
65cb5deedb Use path instead of Path in some run-make tests 2024-08-29 10:15:17 -04:00
Oneirical
da43f95dd3 Add needs-unwind compiletest directive to libtest-thread-limit 2024-08-29 10:13:48 -04:00
Matthias Krüger
57251192f6
Rollup merge of #129641 - notriddle:notriddle/missing-crates-js-resource-suffix, r=GuillaumeGomez
rustdoc: fix missing resource suffix on `crates.js`

Fixes a regression introduced in #128252.
2024-08-28 17:12:18 +02:00
Vadim Petrochenkov
05bd36de50 linker: Better support alternative static library naming on MSVC
Previously `libname.a` naming was supported as a fallback when producing rlibs, but not when producing executables or dynamic libraries
2024-08-27 22:13:31 +03:00
Trevor Gross
e209b05037
Rollup merge of #128935 - lqd:needs-zstd, r=Kobzol
More work on `zstd` compression

r? ``@Kobzol`` as we've discussed this.

This is a draft to show the current approach of supporting zstd in compiletest, and making the tests using it unconditional.

Knowing whether llvm/lld was built with `LLVM_ENABLE_ZSTD` is quite hard, so there are two strategies. There are details in the code, and we can discuss this approach. Until we know the config used to build CI artifacts, it seems our options are somewhat limited in any case.

zlib compression seems always enabled, so we only check this in its dedicated test, allowing the test to ignore errors due to zstd not being supported.

The zstd test is made unconditional in what it tests, by relying on `needs-llvm-zstd` to be ignored when `llvm.libzstd` isn't enabled in `config.toml`.

try-job: x86_64-gnu
try-job: x86_64-msvc
try-job: x86_64-gnu-distcheck
2024-08-27 01:46:50 -05:00
Trevor Gross
9c26ebe32e
Rollup merge of #126985 - Mrmaxmeier:dwarf-embed-source, r=davidtwco
Implement `-Z embed-source` (DWARFv5 source code embedding extension)

Implement https://github.com/rust-lang/compiler-team/issues/764 MCP which adds an unstable flag that exposes LLVM's [DWARFv5 source code embedding](https://dwarfstd.org/issues/180201.1.html) support.
2024-08-27 01:46:49 -05:00
Michael Howell
a1746b4202 rustdoc: fix missing resource suffix on crates.js
Fixes a regression introduced in #128252.
2024-08-26 20:42:32 -07:00
许杰友 Jieyou Xu (Joe)
beaf9d1c14 tests/run-make: add missing needs-llvm-components
Without suitable `needs-llvm-components` directives, these tests that
rely on target-specific codegen can fail if used with a LLVM that is
built without the required components.
2024-08-26 18:20:32 +08:00
Rémy Rakic
1935e21029 expand zstd debuginfo compression test
it now checks zlib and zstd, via rustc and rust-lld
2024-08-25 22:17:51 +00:00
Rémy Rakic
802222fefc prepare test for expanding scope 2024-08-25 22:17:51 +00:00
Rémy Rakic
79f3c51a01 mark rust-lld-compress-debug-sections test as needing zstd
also make it fail if there's a compression issue
2024-08-25 22:17:51 +00:00
bors
eef00c8be8 Auto merge of #128507 - Oneirical:testart-from-scratch, r=jieyouxu
Migrate `libtest-thread-limit` `run-make` test to rmake

Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).

Please try, but **only if normal CI is green**:

// try-job: armhf-gnu // <- failed on this
try-job: aarch64-gnu
2024-08-23 18:30:21 +00:00
Oneirical
318dfb405f rewrite libtest-thread-limit to rmake 2024-08-23 10:29:27 -04:00
bors
a60a9e567a Auto merge of #129464 - GuillaumeGomez:rollup-ckfqd7h, r=GuillaumeGomez
Rollup of 9 pull requests

Successful merges:

 - #128511 (Document WebAssembly target feature expectations)
 - #129243 (do not build `cargo-miri` by default on stable channel)
 - #129263 (Add a missing compatibility note in the 1.80.0 release notes)
 - #129276 (Stabilize feature `char_indices_offset`)
 - #129350 (adapt integer comparison tests for LLVM 20 IR changes)
 - #129408 (Fix handling of macro arguments within the `dropping_copy_types` lint)
 - #129426 (rustdoc-search: use tighter json for names and parents)
 - #129437 (Fix typo in a help diagnostic)
 - #129457 (kobzol vacation)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-08-23 10:56:34 +00:00
Guillaume Gomez
09b37855f6
Rollup merge of #129437 - gurry:fix-diagnostic-typo, r=jieyouxu
Fix typo in a help diagnostic

Replaced "**the your** dependency graph" with "**in the** dependency graph".
2024-08-23 12:32:17 +02:00
Matthias Krüger
fe87433e8a
Rollup merge of #129055 - Oneirical:fortanix-fortification, r=jieyouxu
Migrate `x86_64-fortanix-unknown-sgx-lvi` `run-make` test to rmake

Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).

The final Makefile! Every Makefile test is now claimed.

This is difficult to test due to the uncommon architecture it is specific to. I don't think it is in the CI (I didn't find it in `jobs.yml`, but if there is a way to test it, please do.

Locally, on Linux, it compiles and panics at the `llvm_filecheck` part (if I replace the `x86_64-fortanix-unknown-sgx` with `x86_64-unknown-linux-gnu`, of course), which is expected.

For this reason, the Makefile and associated script have been kept, but with a leading underscore.
2024-08-23 06:26:52 +02:00
Matthias Krüger
370b3265ff
Rollup merge of #127623 - lolbinarycat:fix_remove_dir_all, r=Amanieu
fix: fs::remove_dir_all: treat internal ENOENT as success

fixes #127576

try-job: test-various
2024-08-23 06:26:51 +02:00
Gurinder Singh
b544603c03 Fix typo in help diagnostic 2024-08-23 08:21:25 +05:30
binarycat
736f773844 fix: fs::remove_dir_all: treat ENOENT as success
fixes #127576

windows implementation still needs some work
2024-08-22 14:18:42 -04:00
bors
5ad98b4026 Auto merge of #129257 - ChrisDenton:rename-null-descriptor, r=jieyouxu
Allow rust staticlib to work with MSVC's /WHOLEARCHIVE

This fixes #129020 by renaming the `__NULL_IMPORT_DESCRIPTOR` to prevent conflicts.

try-job: dist-i686-msvc
2024-08-22 15:53:02 +00:00
Oneirical
e276d22efc rewrite x86_64-fortanix-unknown-sgx-lvi to rmake 2024-08-22 10:22:17 -04:00
Zalathar
34cdfc9b49 Advise against removing run-make/libtest-junit/validate_junit.py
Trying to get rid of this Python script looks tempting, because it's currently
the only Python script in the whole `run-make` suite that we actually run.

But getting rid of it would require pulling in a Rust crate to parse XML
instead, and that's probably not worth the extra hassle for a relatively-minor
test.
2024-08-22 12:13:25 +10:00
Zalathar
5fc562c5b1 Rename foo.py to my_gdb_script.py
This makes it easier for maintainers to see what the Python script is for.
2024-08-22 11:52:21 +10:00
Zalathar
7232a07f5a Explain the run-make/debugger-visualizer-dep-info Python script 2024-08-22 11:51:02 +10:00
Chris Denton
76fbf0af77
Test wholearchive on rust staticlib 2024-08-19 18:26:55 +00:00
bors
334e509912 Auto merge of #129227 - jieyouxu:no-dumping, r=Kobzol
Disable `dump-ice-to-disk` for i686-mingw (again)

To avoid blocking full CI or `i686-mingw` try jobs (failed in https://github.com/rust-lang/rust/pull/127679#issuecomment-2295184771).

At least we now have some context for why the assertion failed.

Anyone with r+ can approve this.
2024-08-18 09:47:46 +00:00
许杰友 Jieyou Xu (Joe)
ce7a70ade8 tests: disable dump-ice-to-disk for i686-mingw
To avoid blocking full CI.
2024-08-18 09:13:44 +00:00
许杰友 Jieyou Xu (Joe)
4e087683e5
Rollup merge of #129185 - Zalathar:validate-json, r=jieyouxu
Port `run-make/libtest-json/validate_json.py` to Rust

This is a trivial Python script that simply tries to parse each line of stdin (i.e. the test process output) as JSON, to verify that the overall output is JSON Lines.

We can perform the same check directly in `rmake.rs` using `serde_json`.

r? ````@jieyouxu````
2024-08-18 14:55:23 +08:00
bors
23f762d3b1 Auto merge of #129115 - jieyouxu:reenable-dump-ice, r=estebank
Re-enable `dump-ice-to-disk` for Windows

This test was previously flakey on `i686-mingw` (reason unknown), but since some modifications (quarantining each ICE test in separate tmp dirs, adding/removing `RUSTC_ICE` env vars as suitable to prevent any kind of environmental influence), I could no longer make it fail on `i686-mingw`.

I tried running this test (without the `ignore-windows` of course) a bunch of times via `i686-mingw` try jobs and it refused to fail (see #128958). I was also never able to reproduce the failure locally.

In any case, if this turns out to be still flakey on `i686-mingw`, we can revert the removal of `ignore-windows` but this time we'll have way more context for why the test failed.

Running the `i686-mingw` alongside some Windows jobs for basic santiy check. But the try jobs succeeding is insufficient to guarantee reproducibility.

cc #129115 for backlink.

try-job: x86_64-msvc
try-job: x86_64-mingw
try-job: i686-msvc
try-job: i686-mingw
2024-08-18 02:25:33 +00:00
bors
9b318d2e93 Auto merge of #128786 - estebank:multiple-crate-versions, r=fee1-dead
Detect multiple crate versions on method not found

When a type comes indirectly from one crate version but the imported trait comes from a separate crate version, the called method won't be found. We now show additional context:

```
error[E0599]: no method named `foo` found for struct `dep_2_reexport::Type` in the current scope
 --> multiple-dep-versions.rs:8:10
  |
8 |     Type.foo();
  |          ^^^ method not found in `Type`
  |
note: there are multiple different versions of crate `dependency` in the dependency graph
 --> multiple-dep-versions.rs:4:32
  |
4 | use dependency::{do_something, Trait};
  |                                ^^^^^ `dependency` imported here doesn't correspond to the right crate version
  |
 ::: ~/rust/build/x86_64-unknown-linux-gnu/test/run-make/crate-loading/rmake_out/multiple-dep-versions-1.rs:4:1
  |
4 | pub trait Trait {
  | --------------- this is the trait that was imported
  |
 ::: ~/rust/build/x86_64-unknown-linux-gnu/test/run-make/crate-loading/rmake_out/multiple-dep-versions-2.rs:4:1
  |
4 | pub trait Trait {
  | --------------- this is the trait that is needed
5 |     fn foo(&self);
  |        --- the method is available for `dep_2_reexport::Type` here
```

Fix #128569, fix #110926, fix #109161, fix #81659, fix #51458, fix #32611. Follow up to #124944.
2024-08-17 14:40:04 +00:00
Zalathar
3116db669c Port run-make/libtest-json/validate_json.py to Rust
This is a trivial Python script that simply tries to parse each line of stdin
(i.e. the test process output) as JSON, to verify that the overall output is
JSON Lines.

We can perform the same check directly in `rmake.rs` using `serde_json`.
2024-08-17 18:15:38 +10:00
bors
506052d49d Auto merge of #129162 - matthiaskrgr:rollup-r0oxdev, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #128990 (Re-enable more debuginfo tests on freebsd)
 - #129042 (Special-case alias ty during the delayed bug emission in `try_from_lit`)
 - #129086 (Stabilize `is_none_or`)
 - #129149 (Migrate `validate_json.py` script to rust in `run-make/rustdoc-map-file` test)
 - #129154 (Fix wrong source location for some incorrect macro definitions)
 - #129161 (Stabilize std:🧵:Builder::spawn_unchecked)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-08-16 20:19:00 +00:00
Guillaume Gomez
6b1637c477 Reexport serde_json crate from run-make-support to give it access to run-make tests 2024-08-16 16:32:07 +02:00
Guillaume Gomez
a2a4f2bcb5 Migrate validate_json.py script to rust in run-make/rustdoc-map-file test 2024-08-16 16:32:06 +02:00
Oneirical
e752410a43 massive refactor of reproducible-build test 2024-08-16 10:10:25 -04:00
Oneirical
3c68b113c0 rewrite reproducible-build to rmake 2024-08-16 10:10:24 -04:00
Jubilee
051eba0931
Rollup merge of #129111 - Zalathar:python-sysroot, r=jieyouxu
Port the `sysroot-crates-are-unstable` Python script to rmake

New version of #126231, and a follow-up to #129071.

One major difference is that the new version no longer tries to report *all* accidentally-stable crates, because the `run_make_support` helpers tend to halt the test as soon as something goes wrong. That's unfortunate, but I think it won't matter much in practice, and preserving the old behaviour doesn't seem worth the extra effort.

---

Part of #110479 (Python purge), with this being one of the non-trivial Python scripts that actually seems feasible and worthwhile to remove.

This is *not* part of #121876 (Makefile purge), because the underlying test is already using rmake; this PR just modifies the existing rmake recipe to do all the work itself instead of delegating to Python. So there's no particular urgency here.

r? ````@jieyouxu````

try-job: aarch64-gnu
try-job: aarch64-apple
try-job: test-various
try-job: armhf-gnu
try-job: x86_64-msvc
try-job: i686-mingw
2024-08-15 18:44:19 -07:00
Jubilee
eb6ecf1db9
Rollup merge of #129037 - Zalathar:rmake-libtest, r=jieyouxu
Port `run-make/libtest-json` and `run-make/libtest-junit` to rmake

Unlike #126773, this is just a straightforward port to `rmake`, without attempting to switch to compiletest or get rid of the (trivial) Python scripts.

Part of #121876.

r? ````@jieyouxu````

try-job: x86_64-msvc
try-job: i686-mingw
try-job: test-various
try-job: aarch64-gnu
try-job: aarch64-apple
2024-08-15 18:44:17 -07:00
Jubilee
759f93f421
Rollup merge of #129018 - Oneirical:nmemonic-artifice, r=jieyouxu
Migrate `rlib-format-packed-bundled-libs` and `native-link-modifier-bundle` `run-make` tests to rmake

Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).

Please try:

// try-job: test-various (ATTEMPTED: IGNORE RESTORED)
try-job: x86_64-msvc
try-job: aarch64-apple
try-job: aarch64-gnu
try-job: x86_64-mingw
try-job: i686-mingw
2024-08-15 18:44:17 -07:00
bors
4b7d074d76 Auto merge of #128787 - Oneirical:infohazardous-deprogram, r=jieyouxu
Coalesce `dep-info`, `dep-info-spaces` and `dep-info-doesnt-run-much` `run-make` tests into `dep-info` rmake.rs

Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).

This is one of the most ancient tests in the `run-make` directory and its Makefile does some unexpected things, like creating and deleting a `done` directory over and over, sleeping at certain times (this is the [commit](0d9fd8e2a1) that added the `sleep`).

I tried to preserve the intent of the test, which is smoke-testing that `dep-info` works.

try-job: x86_64-msvc
try-job: i686-mingw
try-job: aarch64-gnu
try-job: aarch64-apple
try-job: test-various
try-job: armhf-gnu
try-job: dist-various-1
2024-08-15 22:33:03 +00:00
Matthias Krüger
bc986c7290
Rollup merge of #129122 - GuillaumeGomez:remove-duplicated-rustdoc-output-methods, r=Kobzol
Remove duplicated `Rustdoc::output` method from `run-make-support` lib

I discovered recently that `--output` is deprecated in rustdoc and that `--out-dir` is doing the exact same thing. To keep things along with the current rustdoc status, I removed the `Rustdoc::output` method.

cc `@jieyouxu`
r? `@Kobzol`
2024-08-15 19:32:38 +02:00
Oneirical
51628fb666 rewrite native-link-modifier-bundle to rmake 2024-08-15 10:17:38 -04:00
Oneirical
2e4d5bbba7 rewrite rlib-format-packed-bundled-libs to rmake 2024-08-15 10:17:25 -04:00
Oneirical
7c4d56102a coalesce dep-info-spaces and dep-info-doesnt-run-much into dep-info 2024-08-15 10:16:30 -04:00
bors
d2b5aa6552 Auto merge of #128936 - bjorn3:fix_thin_archive_reading, r=jieyouxu
Support reading thin archives in ArArchiveBuilder

And switch to using ArArchiveBuilder with the LLVM backend too now that all regressions are fixed.

Fixes https://github.com/rust-lang/rust/issues/107407
Fixes https://github.com/rust-lang/rust/issues/107162
https://github.com/rust-lang/rust/issues/107495 has been fixed in a previous PR already.
2024-08-15 14:13:52 +00:00