tree: 4dc7befabfba74d095dad5797bc604e8a06c1f00
  1. a-b-a-linker-guard/
  2. alloc-no-oom-handling/
  3. alloc-no-rc/
  4. alloc-no-sync/
  5. allocator-shim-circular-deps/
  6. allow-warnings-cmdline-stability/
  7. amdgpu-kd/
  8. apple-c-available-links/
  9. apple-deployment-target/
  10. apple-sdk-version/
  11. archive-duplicate-names/
  12. arguments-non-c-like-enum/
  13. arm64ec-import-export-static/
  14. artifact-incr-cache/
  15. artifact-incr-cache-no-obj/
  16. atomic-lock-free/
  17. autodiff/
  18. avr-rjmp-offset/
  19. bare-outfile/
  20. bin-emit-no-symbols/
  21. box-struct-no-segfault/
  22. branch-protection-check-IBT/
  23. broken-pipe-no-ice/
  24. c-dynamic-dylib/
  25. c-dynamic-rlib/
  26. c-link-to-rust-dylib/
  27. c-link-to-rust-staticlib/
  28. c-link-to-rust-va-list-fn/
  29. c-static-dylib/
  30. c-static-rlib/
  31. c-unwind-abi-catch-lib-panic/
  32. c-unwind-abi-catch-panic/
  33. cdylib/
  34. cdylib-dylib-linkage/
  35. cdylib-export-c-library-symbols/
  36. cdylib-fewer-symbols/
  37. checksum-freshness/
  38. clear-error-blank-output/
  39. codegen-options-parsing/
  40. comment-section/
  41. compile-stdin/
  42. compiler-lookup-paths/
  43. compiler-lookup-paths-2/
  44. compiler-rt-works-on-mingw/
  45. compiletest-self-test/
  46. compressed-debuginfo/
  47. compressed-debuginfo-zstd/
  48. const-prop-lint/
  49. const-trait-stable-toolchain/
  50. const_fn_mir/
  51. core-no-fp-fmt-parse/
  52. core-no-oom-handling/
  53. cpp-global-destructors/
  54. crate-circular-deps-link/
  55. crate-data-smoke/
  56. crate-hash-rustc-version/
  57. crate-loading/
  58. crate-loading-crate-depends-on-itself/
  59. crate-loading-multiple-candidates/
  60. crate-name-priority/
  61. cross-lang-lto/
  62. cross-lang-lto-clang/
  63. cross-lang-lto-pgo-smoketest-clang/
  64. cross-lang-lto-riscv-abi/
  65. cross-lang-lto-upstream-rlibs/
  66. CURRENT_RUSTC_VERSION/
  67. debug-assertions/
  68. debugger-visualizer-dep-info/
  69. dep-graph/
  70. dep-info/
  71. deref-impl-rustdoc-ice/
  72. diagnostics-traits-from-duplicate-crates/
  73. dirty-incr-due-to-hard-link/
  74. doctests-compilation-time-info/
  75. doctests-junit/
  76. doctests-keep-binaries/
  77. doctests-keep-binaries-2024/
  78. doctests-merge/
  79. doctests-runtool/
  80. dos-device-input/
  81. dump-ice-to-disk/
  82. dump-mono-stats/
  83. duplicate-dependency/
  84. duplicate-dependency-no-disambiguate/
  85. duplicate-output-flavors/
  86. duplicate-profiler-builtins/
  87. dylib-chain/
  88. dylib-soname/
  89. embed-metadata/
  90. embed-source-dwarf/
  91. emit/
  92. emit-named-files/
  93. emit-path-unhashed/
  94. emit-shared-files/
  95. emit-stack-sizes/
  96. emit-to-stdout/
  97. env-dep-info/
  98. error-found-staticlib-instead-crate/
  99. error-writing-dependencies/
  100. exit-code/
  101. export/
  102. export-executable-symbols/
  103. extern-diff-internal-name/
  104. extern-flag-disambiguates/
  105. extern-flag-fun/
  106. extern-flag-pathless/
  107. extern-flag-rename-transitive/
  108. extern-fn-explicit-align/
  109. extern-fn-generic/
  110. extern-fn-mangle/
  111. extern-fn-reachable/
  112. extern-fn-slice-no-ice/
  113. extern-fn-struct-passing-abi/
  114. extern-fn-with-extern-types/
  115. extern-fn-with-packed-struct/
  116. extern-fn-with-union/
  117. extern-multiple-copies/
  118. extern-multiple-copies2/
  119. extern-overrides-distribution/
  120. external-crate-panic-handle-no-lint/
  121. extra-filename-with-temp-outputs/
  122. fat-then-thin-lto/
  123. forced-unwind-terminate-pof/
  124. foreign-double-unwind/
  125. foreign-exceptions/
  126. foreign-rust-exceptions/
  127. frontmatter-no-trailing-newline/
  128. glibc-staticlib-args/
  129. glibc-symbols-x86_64-unknown-linux-gnu/
  130. ice-dep-cannot-find-dep/
  131. ice-static-mir/
  132. import-macro-verbatim/
  133. inaccessible-temp-dir/
  134. include-all-symbols-linking/
  135. include-bytes-deps/
  136. incr-add-rust-src-component/
  137. incr-foreign-head-span/
  138. incr-prev-body-beyond-eof/
  139. incr-test-moved-file/
  140. incremental-debugger-visualizer/
  141. incremental-finalize-fail/
  142. incremental-session-fail/
  143. inline-always-many-cgu/
  144. instrument-mcount-link-pg/
  145. interdependent-c-libraries/
  146. intrinsic-unreachable/
  147. invalid-library/
  148. invalid-so/
  149. invalid-staticlib/
  150. invalid-symlink-search-path/
  151. invalid-tmpdir-no-ice/
  152. issue-107495-archive-permissions/
  153. issue-125484-used-dependencies/
  154. issue-149402-suggest-unresolve/
  155. issue-84395-lto-embed-bitcode/
  156. jobserver-error/
  157. json-error-no-offset/
  158. lib-trait-for-trait-no-ice/
  159. libs-through-symlinks/
  160. libstd-no-protected/
  161. libtest-json/
  162. libtest-junit/
  163. libtest-padding/
  164. libtest-thread-limit/
  165. link-arg/
  166. link-args-order/
  167. link-cfg/
  168. link-dedup/
  169. link-eh-frame-terminator/
  170. link-framework/
  171. link-native-static-lib-to-dylib/
  172. link-path-order/
  173. link-under-xcode/
  174. linkage-attr-framework/
  175. linkage-attr-on-static/
  176. linker-plugin-lto-fat/
  177. linker-warning/
  178. llvm-ident/
  179. llvm-location-discriminator-limit-dummy-span/
  180. llvm-outputs/
  181. long-linker-command-lines/
  182. long-linker-command-lines-cmd-exe/
  183. longjmp-across-rust/
  184. ls-metadata/
  185. lto-avoid-object-duplication/
  186. lto-dylib-dep/
  187. lto-empty/
  188. lto-linkage-used-attr/
  189. lto-long-filenames/
  190. lto-long-filenames_cn/
  191. lto-no-link-whole-rlib/
  192. lto-readonly-lib/
  193. lto-smoke/
  194. lto-smoke-c/
  195. macos-deployment-target-warning/
  196. macos-fat-archive/
  197. manual-crate-name/
  198. manual-link/
  199. many-crates-but-no-match/
  200. metadata-dep-info/
  201. metadata-flag-frobs-symbols/
  202. metadata-only-crate-no-ice/
  203. min-global-align/
  204. mingw-export-call-convention/
  205. mir-opt-bisect-limit/
  206. mismatching-target-triples/
  207. missing-crate-dependency/
  208. missing-unstable-trait-bound/
  209. mixing-deps/
  210. mixing-formats/
  211. mixing-libs/
  212. moved-src-dir-fingerprint-ice/
  213. msvc-lld-thinlto-imp-symbols/
  214. msvc-wholearchive/
  215. mte-ffi/
  216. multiline-args-value/
  217. multiple-emits/
  218. musl-default-linking/
  219. naked-symbol-visibility/
  220. native-lib-alt-naming/
  221. native-lib-load-order/
  222. native-link-modifier-bundle/
  223. native-link-modifier-verbatim-linker/
  224. native-link-modifier-verbatim-rustc/
  225. native-link-modifier-whole-archive/
  226. no-alloc-shim/
  227. no-builtins-attribute/
  228. no-builtins-linker-plugin-lto/
  229. no-builtins-lto/
  230. no-cdylib-as-rdylib/
  231. no-duplicate-libs/
  232. no-input-file/
  233. no-intermediate-extras/
  234. non-pie-thread-local/
  235. non-unicode-env/
  236. non-unicode-in-incremental-dir/
  237. notify-all-emit-artifacts/
  238. obey-crate-type-flag/
  239. optimization-remarks-dir/
  240. optimization-remarks-dir-pgo/
  241. option-output-no-space/
  242. output-filename-conflicts-with-directory/
  243. output-filename-overwrites-input/
  244. output-type-permutations/
  245. output-with-hyphens/
  246. override-aliased-flags/
  247. overwrite-input/
  248. panic-abort-eh_frame/
  249. panic-impl-transitive/
  250. parallel-rustc-no-overwrite/
  251. pass-linker-flags/
  252. pass-linker-flags-flavor/
  253. pass-linker-flags-from-dep/
  254. pass-non-c-like-enum-to-c/
  255. pdb-alt-path/
  256. pdb-sobjname/
  257. pgo-branch-weights/
  258. pgo-embed-bc-lto/
  259. pgo-gen/
  260. pgo-gen-lto/
  261. pgo-gen-no-imp-symbols/
  262. pgo-indirect-call-promotion/
  263. pgo-use/
  264. pointer-auth-link-with-c/
  265. pointer-auth-link-with-c-lto-clang/
  266. prefer-dylib/
  267. prefer-rlib/
  268. pretty-print-to-file/
  269. pretty-print-with-dep-file/
  270. print-cfg/
  271. print-check-cfg/
  272. print-crate-root-lint-levels/
  273. print-native-static-libs/
  274. print-request-help-stable-unstable/
  275. print-target-cpus-native/
  276. print-target-list/
  277. print-to-output/
  278. proc-macro-init-order/
  279. proc-macro-three-crates/
  280. prune-link-args/
  281. raw-dylib-alt-calling-convention/
  282. raw-dylib-c/
  283. raw-dylib-cross-compilation/
  284. raw-dylib-custom-dlltool/
  285. raw-dylib-elf/
  286. raw-dylib-elf-extern-types/
  287. raw-dylib-elf-verbatim/
  288. raw-dylib-elf-verbatim-absolute/
  289. raw-dylib-import-name-type/
  290. raw-dylib-inline-cross-dylib/
  291. raw-dylib-link-ordinal/
  292. raw-dylib-stdcall-ordinal/
  293. raw-fn-pointer-opt-undefined-behavior/
  294. reachable-extern-fn-available-lto/
  295. redundant-libs/
  296. relocation-model/
  297. relro-levels/
  298. remap-path-prefix/
  299. remap-path-prefix-consts/
  300. remap-path-prefix-dwarf/
  301. remap-path-prefix-std/
  302. remove-dir-all-race/
  303. repr128-dwarf/
  304. reproducible-build/
  305. reproducible-build-2/
  306. reset-codegen-1/
  307. resolve-rename/
  308. return-non-c-like-enum/
  309. return-non-c-like-enum-from-c/
  310. rlib-chain/
  311. rlib-format-packed-bundled-libs/
  312. rlib-format-packed-bundled-libs-2/
  313. rlib-format-packed-bundled-libs-3/
  314. rmeta-preferred/
  315. run-in-tmpdir-self-test/
  316. rust-lld/
  317. rust-lld-custom-target/
  318. rust-lld-link-script-provide/
  319. rust-lld-x86_64-unknown-linux-gnu/
  320. rust-lld-x86_64-unknown-linux-gnu-dist/
  321. rustc-help/
  322. rustc-macro-dep-files/
  323. rustdoc-cfgspec-parsing/
  324. rustdoc-default-output/
  325. rustdoc-dep-info/
  326. rustdoc-determinism/
  327. rustdoc-doctest-output-format/
  328. rustdoc-error-lines/
  329. rustdoc-io-error/
  330. rustdoc-json-external-crate-path/
  331. rustdoc-map-file/
  332. rustdoc-merge-directory/
  333. rustdoc-merge-directory-alias/
  334. rustdoc-merge-no-input-finalize/
  335. rustdoc-output-path/
  336. rustdoc-output-stdout/
  337. rustdoc-scrape-examples-dep-info/
  338. rustdoc-scrape-examples-invalid-expr/
  339. rustdoc-scrape-examples-macros/
  340. rustdoc-scrape-examples-multiple/
  341. rustdoc-scrape-examples-ordering/
  342. rustdoc-scrape-examples-remap/
  343. rustdoc-scrape-examples-test/
  344. rustdoc-scrape-examples-whitespace/
  345. rustdoc-search-load-itemtype/
  346. rustdoc-shared-flags/
  347. rustdoc-target-modifiers/
  348. rustdoc-target-spec-json-path/
  349. rustdoc-tempdir-removal/
  350. rustdoc-test-args/
  351. rustdoc-test-builder/
  352. rustdoc-themes/
  353. rustdoc-verify-output-files/
  354. rustdoc-with-out-dir-option/
  355. rustdoc-with-output-option/
  356. rustdoc-with-short-out-dir-option/
  357. sanitizer-cdylib-link/
  358. sanitizer-dylib-link/
  359. sanitizer-staticlib-link/
  360. separate-link/
  361. separate-link-fail/
  362. share-generics-dylib/
  363. share-generics-export-again/
  364. short-ice/
  365. silly-file-names/
  366. simd-ffi/
  367. split-debuginfo/
  368. stable-symbol-names/
  369. static-dylib-by-default/
  370. static-extern-type/
  371. static-pie/
  372. static-unwinding/
  373. staticlib-blank-lib/
  374. staticlib-broken-bitcode/
  375. staticlib-dylib-linkage/
  376. staticlib-thin-archive/
  377. std-core-cycle/
  378. stdin-rustc/
  379. stdin-rustdoc/
  380. strip/
  381. suspicious-library/
  382. symbol-mangling-hashed/
  383. symbol-visibility/
  384. symbols-all-mangled/
  385. symbols-include-type-name/
  386. symlinked-extern/
  387. symlinked-libraries/
  388. symlinked-rlib/
  389. sysroot-crates-are-unstable/
  390. target-cpu-native/
  391. target-specs/
  392. target-without-atomic-cas/
  393. test-benches/
  394. test-harness/
  395. textrel-on-minimal-lib/
  396. thumb-interworking/
  397. track-path-dep-info/
  398. track-pgo-dep-info/
  399. type-mismatch-same-crate-name/
  400. unknown-mod-stdin/
  401. unstable-feature-usage-metrics/
  402. unstable-feature-usage-metrics-incremental/
  403. unstable-flag-required/
  404. use-suggestions-rust-2018/
  405. used/
  406. used-cdylib-macos/
  407. used-proc-macro/
  408. version-check/
  409. version-verbose-commit-hash/
  410. volatile-intrinsics/
  411. wasm-custom-section/
  412. wasm-custom-sections-opt/
  413. wasm-emscripten-cdylib/
  414. wasm-exceptions-nostd/
  415. wasm-export-all-symbols/
  416. wasm-import-module/
  417. wasm-override-linker/
  418. wasm-panic-small/
  419. wasm-spurious-import/
  420. wasm-stringify-ints-small/
  421. wasm-symbols-different-module/
  422. wasm-symbols-not-exported/
  423. wasm-symbols-not-imported/
  424. wasm-unexpected-features/
  425. weird-output-filenames/
  426. windows-binary-no-external-deps/
  427. windows-gnu-corrupt-drective/
  428. windows-safeseh/
  429. windows-spawn/
  430. windows-ws2_32/
  431. zero-extend-abi-param-passing/
  432. README.md
tests/run-make/README.md

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

A run-make test is a test recipe source file rmake.rs accompanied by its parent directory (e.g. tests/run-make/foo/rmake.rs is the foo run-make test).

The implementation for collecting and building the rmake.rs recipes are in src/tools/compiletest/src/runtest.rs, in run_rmake_test.

The setup for the rmake.rs can be summarized as 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.