rust/tests/run-make
Esteban Küber b2e7ae1f65 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: you have multiple different versions of crate `dependency` in your 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
```
2024-08-12 19:29:47 +00:00
..
a-b-a-linker-guard Run rustfmt on tests/run-make/. 2024-05-31 21:30:08 +10:00
alloc-no-oom-handling Do not use relative paths to Rust source root in run-make tests 2024-06-06 19:16:53 +02:00
alloc-no-rc Do not use relative paths to Rust source root in run-make tests 2024-06-06 19:16:53 +02:00
alloc-no-sync Do not use relative paths to Rust source root in run-make tests 2024-06-06 19:16:53 +02:00
allocator-shim-circular-deps rewrite allocator-shim-circular-deps to ui test 2024-06-18 14:25:59 -04:00
allow-warnings-cmdline-stability Migrate runmake tests away from custom commands and command_output 2024-06-08 19:36:31 +02:00
archive-duplicate-names rewrite archive-duplicate-names to rmake 2024-07-18 09:28:50 -04:00
arguments-non-c-like-enum remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
artifact-incr-cache Remove all usages of tmp_dir from tests 2024-06-07 11:12:24 +02:00
artifact-incr-cache-no-obj Remove all usages of tmp_dir from tests 2024-06-07 11:12:24 +02:00
atomic-lock-free Migrate atomic-lock-free to rmake 2024-07-17 16:47:39 -04:00
bare-outfile Fix bare-outfile test 2024-06-07 11:12:04 +02:00
bin-emit-no-symbols use llvm_readobj in run-make test instead of nm 2024-06-18 14:57:00 -04:00
box-struct-no-segfault Remove all usages of tmp_dir from tests 2024-06-07 11:12:24 +02:00
branch-protection-check-IBT Reformat use declarations. 2024-07-29 08:26:52 +10:00
c-dynamic-dylib rewrite c-dynamic-dylib to rmake 2024-07-23 10:31:21 -04:00
c-dynamic-rlib rewrite c-dynamic-dylib to rmake 2024-07-23 10:31:21 -04:00
c-link-to-rust-dylib tests: update for rfs rename 2024-07-17 13:34:18 +00:00
c-link-to-rust-staticlib remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
c-link-to-rust-va-list-fn Reformat use declarations. 2024-07-29 08:26:52 +10:00
c-static-dylib rewrite pass-non-c-like-enum-to-c to rmake 2024-07-19 12:27:47 -04:00
c-static-rlib rewrite pass-non-c-like-enum-to-c to rmake 2024-07-19 12:27:47 -04:00
c-unwind-abi-catch-lib-panic rewrite export-executable-symbols to rmake 2024-07-26 10:17:39 -04:00
c-unwind-abi-catch-panic rewrite c-unwind-abi-catch-panic to rmake 2024-07-19 14:39:42 -04:00
cat-and-grep-sanity-check add FIXME 2024-05-09 13:29:46 -04:00
cdylib tests: update for rfs rename 2024-07-17 13:34:18 +00:00
cdylib-dylib-linkage rewrite cdylib-dylib-linkage to rmake 2024-08-05 10:39:17 -04:00
cdylib-fewer-symbols rewrite symbols-include-type-name to rmake 2024-07-09 14:30:57 -04:00
clear-error-blank-output Rewrite and rename issue-26092 to rmake 2024-06-17 13:51:52 -04:00
codegen-options-parsing Migrate run-make/codegen-options-parsing to rmake.rs 2024-06-14 13:59:44 +02:00
comment-section remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
compile-stdin Migrate run-make/compile-stdin to rmake.rs 2024-05-27 11:37:27 +02:00
compiler-builtins Reformat use declarations. 2024-07-29 08:26:52 +10:00
compiler-lookup-paths tests: update for rfs rename 2024-07-17 13:34:18 +00:00
compiler-lookup-paths-2 rewrite compiler-lookup-paths-2 to rmake 2024-07-19 16:48:21 -04:00
compiler-rt-works-on-mingw rewrite incr-foreign-head-span to rmake 2024-07-25 11:08:07 -04:00
compressed-debuginfo remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
const_fn_mir remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
const-prop-lint tests: update for rfs rename 2024-07-17 13:34:18 +00:00
core-no-fp-fmt-parse Do not use relative paths to Rust source root in run-make tests 2024-06-06 19:16:53 +02:00
core-no-oom-handling Remove all usages of tmp_dir from tests 2024-06-07 11:12:24 +02:00
cpp-global-destructors rewrite foreign-exceptions to rmake 2024-08-02 10:06:20 -04:00
crate-circular-deps-link rewrite and rename issue-69368 to rmake 2024-07-30 14:44:14 -04:00
crate-data-smoke Migrate runmake tests away from custom commands and command_output 2024-06-08 19:36:31 +02:00
crate-hash-rustc-version Reformat use declarations. 2024-07-29 08:26:52 +10:00
crate-loading Detect multiple crate versions on method not found 2024-08-12 19:29:47 +00:00
crate-name-priority tests: update for rfs rename 2024-07-17 13:34:18 +00:00
cross-lang-lto rewrite cross-lang-lto to rmake 2024-07-31 11:33:08 -04:00
cross-lang-lto-clang run cross-lang-lto-pgo-smoketest in CI by renaming it 2024-08-02 11:54:20 -04:00
cross-lang-lto-pgo-smoketest-clang run cross-lang-lto-pgo-smoketest in CI by renaming it 2024-08-02 11:54:20 -04:00
cross-lang-lto-riscv-abi run cross-lang-lto-pgo-smoketest in CI by renaming it 2024-08-02 11:54:20 -04:00
cross-lang-lto-upstream-rlibs rewrite long-linker-command-lines-cmd-exe to rmake 2024-08-06 11:03:18 -04:00
CURRENT_RUSTC_VERSION remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
debug-assertions rewrite emit-stack-sizes to rmake 2024-06-28 11:18:46 -04:00
debugger-visualizer-dep-info rewrite debugger-visualizer-dep-info to rmake 2024-06-18 16:05:56 -04:00
dep-graph Migrate run-make/dep-graph to rmake.rs 2024-06-15 17:34:43 +02:00
dep-info Run rustfmt on tests/run-make/. 2024-05-31 21:30:08 +10:00
dep-info-doesnt-run-much
dep-info-spaces Run rustfmt on tests/run-make/. 2024-05-31 21:30:08 +10:00
deref-impl-rustdoc-ice Remove all usages of tmp_dir from tests 2024-06-07 11:12:24 +02:00
doctests-keep-binaries Reformat use declarations. 2024-07-29 08:26:52 +10:00
doctests-runtool Reformat use declarations. 2024-07-29 08:26:52 +10:00
dos-device-input Check staticlib name falls back to rust_out 2024-08-05 23:50:15 +00:00
dump-ice-to-disk tests: ignore dump-ice-to-disk on windows 2024-08-11 11:11:22 +00:00
dump-mono-stats tests: update for rfs rename 2024-07-17 13:34:18 +00:00
duplicate-output-flavors Migrate run-make/duplicate-output-flavors to rmake.rs 2024-06-16 11:46:02 +02:00
dylib-chain tests: update for rfs rename 2024-07-17 13:34:18 +00:00
dylib-soname remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
emit Auto merge of #125383 - Oneirical:bundle-them-up, r=jieyouxu 2024-06-03 18:35:54 +00:00
emit-named-files tests: update for rfs rename 2024-07-17 13:34:18 +00:00
emit-path-unhashed tests: update for rfs rename 2024-07-17 13:34:18 +00:00
emit-shared-files Reformat use declarations. 2024-07-29 08:26:52 +10:00
emit-stack-sizes rewrite emit-stack-sizes to rmake 2024-06-28 11:18:46 -04:00
emit-to-stdout Bless run-make tests 2023-11-24 19:15:52 +01:00
env-dep-info rewrite env-dep-info to rmake 2024-07-12 10:58:20 -04:00
error-found-staticlib-instead-crate rewrite error-found-staticlib-instead-crate to rmake 2024-06-14 15:50:33 -04:00
error-writing-dependencies rewrite error-writing-dependencies to rmake 2024-06-19 16:43:22 -04:00
exit-code Migrate runmake tests away from custom commands and command_output 2024-06-08 19:36:31 +02:00
export-executable-symbols rewrite export-executable-symbols to rmake 2024-07-26 10:17:39 -04:00
extern-diff-internal-name rewrite extern-multiple-copies2 to rmake 2024-07-23 15:08:40 -04:00
extern-flag-disambiguates remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
extern-flag-fun rewrite incremental-session-fail to rmake 2024-06-17 13:01:15 -04:00
extern-flag-pathless tests: update for rfs rename 2024-07-17 13:34:18 +00:00
extern-flag-rename-transitive rewrite extern-flag-rename-transitive to rmake 2024-06-18 15:59:33 -04:00
extern-fn-explicit-align rewrite extern-fn-explicit-align to rmake 2024-07-17 15:33:07 -04:00
extern-fn-generic rewrite extern-fn-with-union to rmake 2024-07-19 12:27:47 -04:00
extern-fn-mangle rewrite extern-fn-mangle to rmake 2024-07-17 15:33:17 -04:00
extern-fn-reachable Run rustfmt on tests/run-make/. 2024-05-31 21:30:08 +10:00
extern-fn-slice-no-ice rewrite and rename issue-25581 2024-07-17 15:33:06 -04:00
extern-fn-struct-passing-abi rewrite extern-fn-struct-passing-abi to rmake 2024-07-17 15:33:07 -04:00
extern-fn-with-extern-types rewrite extern-fn-with-extern-types to rmake 2024-07-17 15:33:05 -04:00
extern-fn-with-packed-struct rewrite extern-fn-with-packed-struct to rmake 2024-07-17 15:33:07 -04:00
extern-fn-with-union rewrite extern-fn-with-union to rmake 2024-07-19 12:27:47 -04:00
extern-multiple-copies rewrite extern-multiple-copies2 to rmake 2024-07-23 15:08:40 -04:00
extern-multiple-copies2 rewrite extern-multiple-copies2 to rmake 2024-07-23 15:08:40 -04:00
extern-overrides-distribution rewrite extern-overrides-distribution to rmake 2024-06-18 16:30:26 -04:00
external-crate-panic-handle-no-lint Remove all usages of tmp_dir from tests 2024-06-07 11:12:24 +02:00
extra-filename-with-temp-outputs tests: update for rfs rename 2024-07-17 13:34:18 +00:00
fmt-write-bloat Update reason why fmt-write-bloat ignores windows 2024-08-09 21:21:43 +00:00
forced-unwind-terminate-pof Rollup merge of #126644 - Oneirical:testla-coil, r=jieyouxu 2024-06-20 18:20:12 +02:00
foreign-double-unwind rewrite foreign-exceptions to rmake 2024-08-02 10:06:20 -04:00
foreign-exceptions rewrite foreign-exceptions to rmake 2024-08-02 10:06:20 -04:00
foreign-rust-exceptions rewrite export-executable-symbols to rmake 2024-07-26 10:17:39 -04:00
glibc-staticlib-args Improve run-make-support library args API 2024-06-30 12:40:24 +02:00
ice-dep-cannot-find-dep remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
ice-static-mir rewrite and rename issue-85401-static-mir 2024-07-17 16:10:22 -04:00
inaccessible-temp-dir tests: update for rfs rename 2024-07-17 13:34:18 +00:00
include-all-symbols-linking rewrite test-harness to rmake 2024-07-02 11:37:59 -04:00
include-bytes-deps rewrite rmeta-preferred to rmake 2024-07-04 10:05:56 -04:00
incr-add-rust-src-component ignore failing cross-compiled run-make tests 2023-03-30 08:46:31 -05:00
incr-foreign-head-span rewrite incr-foreign-head-span to rmake 2024-07-25 11:08:07 -04:00
incr-prev-body-beyond-eof Reformat use declarations. 2024-07-29 08:26:52 +10:00
incr-test-moved-file remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
incremental-debugger-visualizer remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
incremental-session-fail tests: update for rfs rename 2024-07-17 13:34:18 +00:00
inline-always-many-cgu Reformat use declarations. 2024-07-29 08:26:52 +10:00
interdependent-c-libraries rewrite incr-foreign-head-span to rmake 2024-07-25 11:08:07 -04:00
intrinsic-unreachable Reformat use declarations. 2024-07-29 08:26:52 +10:00
invalid-library Reformat use declarations. 2024-07-29 08:26:52 +10:00
invalid-so tests: update for rfs rename 2024-07-17 13:34:18 +00:00
invalid-staticlib tests: update for rfs rename 2024-07-17 13:34:18 +00:00
invalid-symlink-search-path Rewrite and rename issue-26006 to rmake 2024-07-18 11:14:07 -04:00
invalid-tmpdir-env-var rewrite and rename issue-107094 to rmake 2024-07-22 10:12:00 -04:00
issue-84395-lto-embed-bitcode Rename needs-matching-clang to needs-force-clang-based-tests 2024-06-11 16:45:51 +10:00
issue-107495-archive-permissions Reformat use declarations. 2024-07-29 08:26:52 +10:00
issue-125484-used-dependencies Remove all usages of tmp_dir from tests 2024-06-07 11:12:24 +02:00
jobserver-error Avoid a couple of unnecessary EarlyDiagCtxt uses 2024-06-22 17:06:47 +00:00
json-error-no-offset Rewrite and rename issue-35164 to rmake 2024-07-26 14:17:11 -04:00
lib-trait-for-trait-no-ice Reformat use declarations. 2024-07-29 08:26:52 +10:00
libs-through-symlinks ignore failing cross-compiled run-make tests 2023-03-30 08:46:31 -05:00
libtest-json Change default panic handler message format. 2023-07-29 11:42:50 +02:00
libtest-junit Add needs-unwind annotations to a couple of tests 2024-03-25 14:19:07 +00:00
libtest-padding rewrite libtest-padding to rmake 2024-06-26 11:44:23 -04:00
libtest-thread-limit Reformat use declarations. 2024-07-29 08:26:52 +10:00
link-arg Test that --print link-args ends in newline 2024-07-09 23:07:38 +01:00
link-args-order Enable msvc for link-args-order 2024-08-04 15:09:21 +00:00
link-cfg rewrite link-cfg to rmake 2024-07-29 14:33:54 -04:00
link-dedup run-make: enable msvc for link-dedup 2024-08-04 11:25:48 +00:00
link-eh-frame-terminator rewrite and rename issue-69368 to rmake 2024-07-30 14:44:14 -04:00
link-framework Migrate run-make/link-framework to rmake.rs 2024-07-22 23:21:59 +02:00
link-native-static-lib-to-dylib Rename tests/run-make/issue-15460 into tests/run-make/link-native-static-lib-to-dylib 2024-07-23 11:47:11 +02:00
link-path-order rewrite link-path-order to rmake 2024-07-18 16:27:34 -04:00
linkage-attr-on-static rewrite linkage-attr-on-static to rmake 2024-07-19 12:27:47 -04:00
llvm-ident Improve code of run-make/llvm-ident 2024-07-08 20:18:21 +02:00
llvm-outputs Reformat use declarations. 2024-07-29 08:26:52 +10:00
long-linker-command-lines rewrite long-linker-command-lines-cmd-exe to rmake 2024-08-06 11:03:18 -04:00
long-linker-command-lines-cmd-exe rewrite long-linker-command-lines-cmd-exe to rmake 2024-08-06 11:03:18 -04:00
longjmp-across-rust rewrite longjmp-across-rust to rmake 2024-07-17 15:33:07 -04:00
ls-metadata Reformat use declarations. 2024-07-29 08:26:52 +10:00
lto-avoid-object-duplication rewrite no-builtins-lto to rmake 2024-06-17 15:18:23 -04:00
lto-dylib-dep rewrite lto-dylib-dep to rmake 2024-06-26 13:32:30 -04:00
lto-empty rewrite lto-empty to rmake 2024-06-25 14:27:43 -04:00
lto-linkage-used-attr rewrite pgo-gen-no-imp-symbols to rmake 2024-07-22 13:25:39 -04:00
lto-no-link-whole-rlib rewrite lto-no-link-whole-rlib to rmake 2024-07-19 12:27:47 -04:00
lto-readonly-lib remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
lto-smoke Rewrite simple-rlib to rmake 2024-05-28 11:41:53 -04:00
lto-smoke-c rewrite link-path-order to rmake 2024-07-18 16:27:34 -04:00
macos-deployment-target Raise minimum supported macOS to 10.12 2023-09-23 19:14:25 -05:00
macos-fat-archive rewrite macos-fat-archive to rmake 2024-07-18 09:28:30 -04:00
manual-crate-name Reformat use declarations. 2024-07-29 08:26:52 +10:00
manual-link rewrite manual-link to rmake 2024-07-18 09:28:30 -04:00
many-crates-but-no-match tests: update for rfs rename 2024-07-17 13:34:18 +00:00
metadata-dep-info rewrite metadata-dep-info to rmake 2024-06-28 16:45:29 -04:00
metadata-flag-frobs-symbols rewrite forced-unwind-terminate-pof to rmake 2024-06-19 14:39:09 -04:00
metadata-only-crate-no-ice rewrite rmeta-preferred to rmake 2024-07-04 10:05:56 -04:00
min-global-align Forbid implementing Freeze even if the trait is stabilized 2024-02-29 14:10:29 +00:00
mingw-export-call-convention rewrite mingw-export-call-convention to rmake 2024-06-25 12:46:58 -04:00
mismatching-target-triples rewrite mismatching-target-triples to rmake 2024-06-21 15:46:34 -04:00
missing-crate-dependency rewrite unstable-flag-required to rmake 2024-07-17 16:11:11 -04:00
mixing-deps Run rustfmt on tests/run-make/. 2024-05-31 21:30:08 +10:00
mixing-formats Implement fs wrapper for run_make_support 2024-06-11 09:53:31 -04:00
mixing-libs tests: update for rfs rename 2024-07-17 13:34:18 +00:00
moved-src-dir-fingerprint-ice tests: update for rfs rename 2024-07-17 13:34:18 +00:00
mte-ffi Remove redundant information and simplify only condition 2024-07-31 09:27:48 +01:00
multiple-emits remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
naked-symbol-visibility remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
native-lib-load-order rewrite and rename issue-28595 to rmake 2024-07-19 12:27:46 -04:00
native-link-modifier-bundle move tools.mk to run-make 2023-03-30 07:58:50 -05:00
native-link-modifier-verbatim-linker rewrite native-link-modifier-linker to rmake 2024-06-17 14:45:19 -04:00
native-link-modifier-verbatim-rustc rewrite native-link-modifier-linker to rmake 2024-06-17 14:45:19 -04:00
native-link-modifier-whole-archive rewrite no-builtins-attribute to rmake 2024-07-26 12:07:33 -04:00
no-alloc-shim Ignore test on MSVC for now 2023-05-11 14:47:56 +00:00
no-builtins-attribute rewrite no-builtins-attribute to rmake 2024-07-26 12:07:33 -04:00
no-builtins-lto rewrite no-builtins-lto to rmake 2024-06-17 15:18:23 -04:00
no-cdylib-as-rdylib port no-cdylib-as-rdylib test 2024-05-14 17:02:20 -04:00
no-duplicate-libs Enable msvc for no-duplicate-libs 2024-08-04 02:57:18 +00:00
no-input-file Avoid a couple of unnecessary EarlyDiagCtxt uses 2024-06-22 17:06:47 +00:00
no-intermediate-extras Reformat use declarations. 2024-07-29 08:26:52 +10:00
non-pie-thread-local Remove all usages of tmp_dir from tests 2024-06-07 11:12:24 +02:00
non-unicode-env Reformat use declarations. 2024-07-29 08:26:52 +10:00
non-unicode-in-incremental-dir remove other warnings from rmake tests 2024-08-10 18:16:15 +00:00
notify-all-emit-artifacts Migrate runmake tests away from custom commands and command_output 2024-06-08 19:36:31 +02:00
obey-crate-type-flag Reformat use declarations. 2024-07-29 08:26:52 +10:00
optimization-remarks-dir add shallow_find_files helper function to run-make-support 2024-07-04 10:05:56 -04:00
optimization-remarks-dir-pgo add shallow_find_files helper function to run-make-support 2024-07-04 10:05:56 -04:00
output-filename-conflicts-with-directory tests: update for rfs rename 2024-07-17 13:34:18 +00:00
output-filename-overwrites-input tests: update for rfs rename 2024-07-17 13:34:18 +00:00
output-type-permutations remove other warnings from rmake tests 2024-08-10 18:16:15 +00:00
output-with-hyphens Add new test_while_readonly helper function to run-make-support 2024-06-17 14:37:49 -04:00
override-aliased-flags Migrate run-make/override-aliased-flags to rmake.rs 2024-06-29 11:55:30 +02:00
overwrite-input rewrite overwrite-input to rmake 2024-06-26 13:11:46 -04:00
panic-abort-eh_frame rewrite panic-abort-eh_frame to rmake 2024-07-25 11:17:34 -04:00
panic-impl-transitive Remove all usages of tmp_dir from tests 2024-06-07 11:12:24 +02:00
parallel-rustc-no-overwrite Reformat use declarations. 2024-07-29 08:26:52 +10:00
pass-linker-flags rewrite pass-linker-flags-flavor to rmake 2024-07-04 13:16:11 -04:00
pass-linker-flags-flavor rewrite pass-linker-flags-from-dep to rmake 2024-07-05 12:47:19 -04:00
pass-linker-flags-from-dep rewrite pass-linker-flags-from-dep to rmake 2024-07-05 12:47:19 -04:00
pass-non-c-like-enum-to-c rewrite pass-non-c-like-enum-to-c to rmake 2024-07-19 12:27:47 -04:00
pdb-alt-path rewrite mingw-export-call-convention to rmake 2024-06-25 12:46:58 -04:00
pdb-buildinfo-cl-cmd rewrite pgo-indirect-call-promotion to rmake 2024-08-07 12:57:34 -04:00
pgo-branch-weights Reformat use declarations. 2024-07-29 08:26:52 +10:00
pgo-gen Add shallow_find_files helper function to run-make-support 2024-07-05 10:25:48 -04:00
pgo-gen-lto rewrite pgo-gen-lto to rmake 2024-08-06 16:35:08 -04:00
pgo-gen-no-imp-symbols rewrite pgo-gen-no-imp-symbols to rmake 2024-07-22 13:25:39 -04:00
pgo-indirect-call-promotion rewrite pgo-indirect-call-promotion to rmake 2024-08-07 12:57:34 -04:00
pgo-use tests: update for rfs rename 2024-07-17 13:34:18 +00:00
pointer-auth-link-with-c rewrite pointer-auth-link-with-c to rmake 2024-07-22 11:14:34 -04:00
prefer-dylib tests: update for rfs rename 2024-07-17 13:34:18 +00:00
prefer-rlib tests: update for rfs rename 2024-07-17 13:34:18 +00:00
pretty-print-to-file rewrite pretty-print-to-file to rmake 2024-06-26 11:44:11 -04:00
pretty-print-with-dep-file Reformat use declarations. 2024-07-29 08:26:52 +10:00
print-cfg Ensure Rustc::print use in rmake tests 2024-08-03 22:36:08 -04:00
print-check-cfg remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
print-native-static-libs remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
print-target-list Migrate print-target-list to rmake 2024-08-03 22:36:08 -04:00
print-to-output Ensure Rustc::print use in rmake tests 2024-08-03 22:36:08 -04:00
proc-macro-init-order Run rustfmt on tests/run-make/. 2024-05-31 21:30:08 +10:00
proc-macro-three-crates rewrite track-pgo-dep-info to rmake 2024-07-08 10:31:05 -04:00
profile Reformat use declarations. 2024-07-29 08:26:52 +10:00
prune-link-args build_native_static_lib with llvm_ar for run_make_support 2024-07-16 15:34:04 -04:00
raw-dylib-alt-calling-convention rewrite redundant-libs to rmake 2024-08-05 10:11:53 -04:00
raw-dylib-c rewrite redundant-libs to rmake 2024-08-05 10:11:53 -04:00
raw-dylib-cross-compilation rewrite used-cdylib-macos to rmake 2024-06-28 16:28:57 -04:00
raw-dylib-custom-dlltool rewrite raw-dylib-custom-dlltool to rmake 2024-07-12 16:41:28 -04:00
raw-dylib-import-name-type rewrite raw-dylib-stdcall-ordinal to rmake 2024-07-29 10:58:28 -04:00
raw-dylib-inline-cross-dylib rewrite raw-dylib-custom-dlltool to rmake 2024-07-12 16:41:28 -04:00
raw-dylib-link-ordinal rewrite raw-dylib-stdcall-ordinal to rmake 2024-07-29 10:58:28 -04:00
raw-dylib-stdcall-ordinal rewrite raw-dylib-stdcall-ordinal to rmake 2024-07-29 10:58:28 -04:00
raw-fn-pointer-opt-undefined-behavior rewrite and rename issue-20626 to rmake 2024-06-25 15:02:19 -04:00
reachable-extern-fn-available-lto Remove unnecessary functions and the last mention of TMPDIR from run-make-support 2024-06-08 13:10:55 +02:00
redundant-libs remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
relocation-model rewrite crate-name-priority to rmake 2024-06-20 16:09:39 -04:00
relro-levels Reformat use declarations. 2024-07-29 08:26:52 +10:00
remap-path-prefix tests: update for rfs rename 2024-07-17 13:34:18 +00:00
remap-path-prefix-dwarf Adjust tests for MacOS having different -Csplit-debuginfo default 2023-10-17 10:11:31 +02:00
repr128-dwarf Reformat use declarations. 2024-07-29 08:26:52 +10:00
reproducible-build Run rustfmt on tests/run-make/. 2024-05-31 21:30:08 +10:00
reproducible-build-2 remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
reset-codegen-1 remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
resolve-rename Reformat use declarations. 2024-07-29 08:26:52 +10:00
return-non-c-like-enum Improve run-make-support library args API 2024-06-30 12:40:24 +02:00
return-non-c-like-enum-from-c rewrite return-non-c-like-enum-from-c to rmake 2024-07-19 12:27:26 -04:00
rlib-chain tests: update for rfs rename 2024-07-17 13:34:18 +00:00
rlib-format-packed-bundled-libs move tools.mk to run-make 2023-03-30 07:58:50 -05:00
rlib-format-packed-bundled-libs-2 assert_stdout_contains_regex in run_make_support + variations 2024-07-26 15:20:01 -04:00
rlib-format-packed-bundled-libs-3 remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
rmeta-preferred rewrite rmeta-preferred to rmake 2024-07-04 10:05:56 -04:00
run-in-tmpdir-self-test remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
rust-lld remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
rust-lld-by-default-beta-stable Reformat use declarations. 2024-07-29 08:26:52 +10:00
rust-lld-by-default-nightly remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
rust-lld-compress-debug-sections remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
rust-lld-custom-target remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
rustc-macro-dep-files rewrite env-dep-info to rmake 2024-07-12 10:58:20 -04:00
rustdoc-cfgspec-parsing Rewrite and rename issue-26006 to rmake 2024-07-18 11:14:07 -04:00
rustdoc-default-output rewrite rustdoc-default-output to rmake 2024-08-02 11:50:19 -04:00
rustdoc-determinism Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustdoc-error-lines Migrate runmake tests away from custom commands and command_output 2024-06-08 19:36:31 +02:00
rustdoc-io-error use rfs in rustdoc io rmake test 2024-08-11 09:45:47 +00:00
rustdoc-map-file tests/run-make: update tests to use new API 2024-06-11 09:14:28 +00:00
rustdoc-output-path Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustdoc-scrape-examples-invalid-expr Run rustfmt on tests/run-make/. 2024-05-31 21:30:08 +10:00
rustdoc-scrape-examples-macros Ensure Rustc::print use in rmake tests 2024-08-03 22:36:08 -04:00
rustdoc-scrape-examples-multiple Migrate run-make/rustdoc-scrape-examples-multiple to rmake.rs 2024-05-21 12:11:17 +02:00
rustdoc-scrape-examples-ordering Migrate run-make/rustdoc-scrape-examples-test to new rmake.rs 2024-05-19 15:02:30 +02:00
rustdoc-scrape-examples-remap remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
rustdoc-scrape-examples-test Run rustfmt on tests/run-make/. 2024-05-31 21:30:08 +10:00
rustdoc-scrape-examples-whitespace Run rustfmt on tests/run-make/. 2024-05-31 21:30:08 +10:00
rustdoc-shared-flags Migrate runmake tests away from custom commands and command_output 2024-06-08 19:36:31 +02:00
rustdoc-target-spec-json-path Remove all usages of tmp_dir from tests 2024-06-07 11:12:24 +02:00
rustdoc-test-args Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustdoc-themes Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustdoc-verify-output-files Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustdoc-with-out-dir-option tests/run-make: update tests to use new API 2024-06-11 09:14:28 +00:00
rustdoc-with-output-option tests/run-make: update tests to use new API 2024-06-11 09:14:28 +00:00
rustdoc-with-short-out-dir-option tests/run-make: update tests to use new API 2024-06-11 09:14:28 +00:00
sanitizer-cdylib-link rewrite sanitizer-cdylib-link to rmake 2024-07-23 10:26:35 -04:00
sanitizer-dylib-link rewrite sanitizer-dylib-link to rmake 2024-07-23 10:26:35 -04:00
sanitizer-staticlib-link rewrite sanitizer-staticlib-link to rmake 2024-07-26 11:45:19 -04:00
separate-link rewrite allocator-shim-circular-deps to ui test 2024-06-18 14:25:59 -04:00
separate-link-fail rewrite separate-link-fail to rmake.rs 2024-06-17 15:59:39 -04:00
sepcomp-cci-copies remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
sepcomp-inlining remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
sepcomp-separate remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
share-generics-dylib rewrite raw-dylib-stdcall-ordinal to rmake 2024-07-29 10:58:28 -04:00
share-generics-export-again rewrite issue64319 and rename 2024-05-17 11:49:20 -04:00
short-ice Add set_backtrace_level helper function to run_make_support 2024-06-11 15:39:54 -04:00
silly-file-names tests: update for rfs rename 2024-07-17 13:34:18 +00:00
simd-ffi rewrite simd-ffi to rmake 2024-08-05 15:07:33 -04:00
split-debuginfo Disable run-make/split-debuginfo test for RISC-V 64 2024-07-19 14:32:32 +01:00
stable-symbol-names rewrite stable-symbol-names to rmake 2024-08-01 11:07:04 -04:00
static-dylib-by-default rewrite sanitizer-staticlib-link to rmake 2024-07-26 11:45:19 -04:00
static-extern-type rewrite static-extern-type to rmake 2024-07-17 15:33:07 -04:00
static-pie Reformat use declarations. 2024-07-29 08:26:52 +10:00
static-unwinding Run rustfmt on tests/run-make/. 2024-05-31 21:30:08 +10:00
staticlib-blank-lib rewrite staticlib-blank-lib to rmake 2024-07-18 09:34:54 -04:00
staticlib-dylib-linkage run-make: enable msvc for staticlib-dylib-linkage 2024-08-08 12:17:15 +00:00
std-core-cycle rewrite and rename issue-18943 to rmake 2024-07-08 09:59:08 -04:00
stdin-rustc Reformat use declarations. 2024-07-29 08:26:52 +10:00
stdin-rustdoc Reformat use declarations. 2024-07-29 08:26:52 +10:00
suspicious-library Reformat use declarations. 2024-07-29 08:26:52 +10:00
symbol-mangling-hashed Run rustfmt on tests/run-make/. 2024-05-31 21:30:08 +10:00
symbol-visibility Remove skipping symbols with the __imp_ prefix 2024-08-03 22:08:39 +00:00
symbols-include-type-name rewrite symbols-include-type-name to rmake 2024-07-09 14:30:57 -04:00
symlinked-extern tests: update for rfs rename 2024-07-17 13:34:18 +00:00
symlinked-libraries tests: update for rfs rename 2024-07-17 13:34:18 +00:00
symlinked-rlib tests: update for rfs rename 2024-07-17 13:34:18 +00:00
sysroot-crates-are-unstable Apply changes to fix python linting errors 2023-06-16 20:56:01 -04:00
target-cpu-native rewrite target-without-atomic-cas to rmake 2024-07-08 10:20:42 -04:00
target-specs tests: update for rfs rename 2024-07-17 13:34:18 +00:00
target-without-atomic-cas rewrite target-without-atomic-cas to rmake 2024-07-08 10:20:42 -04:00
test-benches rewrite compiler-lookup-paths-2 to rmake 2024-07-19 16:48:21 -04:00
test-harness rewrite test-harness to rmake 2024-07-02 11:37:59 -04:00
textrel-on-minimal-lib Improve run-make-support library args API 2024-06-30 12:40:24 +02:00
thumb-none-cortex-m changes after review 2024-08-06 22:08:28 +02:00
thumb-none-qemu changes after review 2024-08-08 10:21:47 +02:00
track-path-dep-info tests: update for rfs rename 2024-07-17 13:34:18 +00:00
track-pgo-dep-info tests: update for rfs rename 2024-07-17 13:34:18 +00:00
translation Fix tests/run-make-translation when download-rustc is enabled 2023-04-19 00:39:20 -05:00
type-mismatch-same-crate-name rewrite type-mismatch-same-crate-name to rmake 2024-07-09 16:34:22 -04:00
unknown-mod-stdin rewrite unknown-mod-stdin to rmake 2024-06-28 16:28:24 -04:00
unstable-flag-required rewrite unstable-flag-required to rmake 2024-07-17 16:11:11 -04:00
use-suggestions-rust-2018 rewrite use-suggestions-rust-2018 to rmake 2024-06-26 12:04:35 -04:00
used Remove BAR for run-make/used.rs 2024-08-03 13:02:32 +00:00
used-cdylib-macos rewrite used-cdylib-macos to rmake 2024-06-28 16:28:57 -04:00
version-verbose-commit-hash rewrite and rename issue-107094 to rmake 2024-07-22 10:12:00 -04:00
volatile-intrinsics Reformat use declarations. 2024-07-29 08:26:52 +10:00
wasm-custom-section Reformat use declarations. 2024-07-29 08:26:52 +10:00
wasm-custom-sections-opt Reformat use declarations. 2024-07-29 08:26:52 +10:00
wasm-exceptions-nostd Rollup merge of #126880 - Rejyr:migrate-rmake-vw, r=Kobzol 2024-07-01 20:29:57 +02:00
wasm-export-all-symbols Reformat use declarations. 2024-07-29 08:26:52 +10:00
wasm-import-module Reformat use declarations. 2024-07-29 08:26:52 +10:00
wasm-override-linker run cross-lang-lto-pgo-smoketest in CI by renaming it 2024-08-02 11:54:20 -04:00
wasm-panic-small Fix two new failing tests 2024-07-19 10:27:14 -07:00
wasm-spurious-import Reformat use declarations. 2024-07-29 08:26:52 +10:00
wasm-stringify-ints-small Fix two new failing tests 2024-07-19 10:27:14 -07:00
wasm-symbols-different-module Reformat use declarations. 2024-07-29 08:26:52 +10:00
wasm-symbols-not-exported Reformat use declarations. 2024-07-29 08:26:52 +10:00
wasm-symbols-not-imported Reformat use declarations. 2024-07-29 08:26:52 +10:00
weird-output-filenames Reformat use declarations. 2024-07-29 08:26:52 +10:00
windows-binary-no-external-deps Reformat use declarations. 2024-07-29 08:26:52 +10:00
windows-safeseh update run-make/windows-safeseh compiletest header 2024-06-28 20:32:31 +03:00
windows-spawn Remove all usages of tmp_dir from tests 2024-06-07 11:12:24 +02:00
windows-ws2_32 Reformat use declarations. 2024-07-29 08:26:52 +10:00
x86_64-fortanix-unknown-sgx-lvi Run rustfmt on tests/run-make/. 2024-05-31 21:30:08 +10:00
zero-extend-abi-param-passing Enable msvc for zero-extend-abi-param-passing 2024-08-04 02:57:17 +00:00
git_clone_sha1.sh
README.md note that rmake.rs files are not subject to automatic formatting 2024-07-25 12:18:24 -04:00
tools.mk Add synchronization library to run-make flags 2024-02-25 22:28:30 -03:00

The run-make test suite

The run-make test suite contains tests which are the most flexible out of all the rust-lang/rust test suites. run-make tests can basically contain arbitrary code, and are supported by the run_make_support library.

Infrastructure

There are two kinds of run-make tests:

  1. The new rmake.rs version: this allows run-make tests to be written in Rust (with rmake.rs as the main test file).
  2. The legacy Makefile version: this is what run-make tests were written with before support for rmake.rs was introduced.

The implementation for collecting and building the rmake.rs recipes (or Makefiles) are in src/tools/compiletest/src/runtest.rs, in run_rmake_v2_test and run_rmake_legacy_test.

Rust-based run-make tests: rmake.rs

The setup for the rmake.rs version is a 3-stage process:

  1. First, we build the run_make_support library in bootstrap as a tool lib.

  2. Then, we compile the rmake.rs "recipe" linking the support library and its dependencies in, and provide a bunch of env vars. We setup a directory structure within build/<target>/test/run-make/

    <test-name>/
        rmake.exe              # recipe binary
        rmake_out/             # sources from test sources copied over
    

    and copy non-rmake.rs input support files over to rmake_out/. The support library is made available as an extern prelude.

  3. Finally, we run the recipe binary and set rmake_out/ as the working directory.

Formatting

Note that files under tests/ are not formatted by ./x fmt, use rustfmt tests/path/to/file.rs to format a specific file if desired.