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