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