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