Commit Graph

1052 Commits

Author SHA1 Message Date
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
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
Guillaume Gomez
d562a4a510 About rmake tests 2024-08-15 15:44:29 +02:00
许杰友 Jieyou Xu (Joe)
35785ef39f tests: re-enable dump-ice-to-disk for Windows
This test was previously flakey on `i686-mingw`, but since some
modifications I could no longer make it fail on `i686-mingw`.

See <https://github.com/rust-lang/rust/pull/128958> for multiple try
job runs.
2024-08-15 05:13:05 +00:00
Zalathar
8b990e35f4 Port the sysroot-crates-are-unstable Python script to rmake 2024-08-15 11:44:05 +10:00
Matthias Krüger
6c242a0da4
Rollup merge of #128963 - GuillaumeGomez:output-to-stdout, r=aDotInTheVoid
Add possibility to generate rustdoc JSON output to stdout

Fixes #127165.

I think it's likely common to want to get rustdoc json output directly instead of reading it from a file so I added this option to allow it. It's unstable and only works with `--output-format=json`.

r? `@aDotInTheVoid`
2024-08-15 00:02:26 +02:00
bors
13a52890dd Auto merge of #128407 - Oneirical:feline-dotestication, r=jieyouxu
Migrate `min-global-align` and `no-alloc-shim` `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: aarch64-apple
try-job: test-various
try-job: armhf-gnu
try-job: aarch64-gnu
try-job: aarch64-gnu
2024-08-14 19:24:19 +00:00
bjorn3
2217014210 Apply some suggestions to the test rmake file 2024-08-14 16:44:05 +00:00
Oneirical
b85bedcb24 rewrite no-alloc-shim to rmake 2024-08-14 10:33:56 -04:00
Oneirical
5e04cefb01 rewrite min-global-align to rmake 2024-08-14 10:33:41 -04:00
许杰友 Jieyou Xu (Joe)
7472d1bbaf
Rollup merge of #129071 - Zalathar:sysroot-unstable, r=jieyouxu
Port `run-make/sysroot-crates-are-unstable` to rmake

I already have a more elaborate draft at #126231 that tries to port the underlying Python script to rmake, but there's no need for the removal of Makefiles to be held up on complex tasks like that, so this PR simply takes the trivial Makefile and converts it into a trivial rmake recipe.

Part of #121876.

r? ``@jieyouxu``
2024-08-14 21:43:09 +08:00
Matthias Krüger
2cb59087db
Rollup merge of #128410 - Oneirical:dwarf-fortestress, r=jieyouxu
Migrate `remap-path-prefix-dwarf` `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).

Possibly my proudest branch name yet.

try-job: aarch64-apple
try-job: armhf-gnu
try-job: test-various
try-job: x86_64-gnu-llvm-18
2024-08-14 05:05:50 +02:00
Zalathar
342b374043 Port run-make/sysroot-crates-are-unstable to rmake 2024-08-14 10:27:26 +10:00
Guillaume Gomez
1d75f78ea2 Ignore cross compile check for tests/run-make/doctests-keep-binaries-2024 test 2024-08-13 20:14:57 +02:00
Guillaume Gomez
488614d2dd Update tests/run-make/doctests-keep-binaries-2024/rmake.rs test to new run-make API 2024-08-13 20:14:57 +02:00
Guillaume Gomez
f1c1c49216 Run fmt 2024-08-13 20:14:57 +02:00
Guillaume Gomez
010731d5b6 Add new run-make tests for doctests 2024-08-13 20:14:54 +02:00
Zalathar
fc733a668a Port run-make/libtest-junit to rmake 2024-08-13 13:28:03 +10:00
Zalathar
c4aa7a71a9 Port run-make/libtest-json to rmake 2024-08-13 13:27:15 +10:00
Matthias Krüger
0dfb5b9cb8
Rollup merge of #129013 - Kobzol:remove-unused-git-clone-sha-file, r=jieyouxu
Remove unused script from run-make tests

Its last usage was removed in https://github.com/rust-lang/rust/pull/128636.

Tracking issue: https://github.com/rust-lang/rust/issues/121876

r? jieyouxu
2024-08-12 23:10:52 +02:00
Esteban Küber
110b19b2b6 Properly differentiate between methods and assoc fns 2024-08-12 19:45:20 +00:00
Esteban Küber
61058937e5 Rework suggestion method
Make checking slightly cheaper (by restricting to the right item only).

Add tests.
2024-08-12 19:29:47 +00:00
Esteban Küber
5c427b4600 reword message 2024-08-12 19:29:47 +00:00