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