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

There are two kinds of run-make tests:

  1. The new rmake.rs version: this allows run-make tests to be written in Rust (with rmake.rs as the main test file).
  2. The legacy Makefile version: this is what run-make tests were written with before support for rmake.rs was introduced.

The implementation for collecting and building the rmake.rs recipes (or Makefiles) are in src/tools/compiletest/src/runtest.rs, in run_rmake_v2_test and run_rmake_legacy_test.

Rust-based run-make tests: rmake.rs

The setup for the rmake.rs version is 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.