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