tree: c11f12a96116cbe308beee33e847dfb0931b51aa [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. cpp-global-destructors/
  43. crate-circular-deps-link/
  44. crate-data-smoke/
  45. crate-hash-rustc-version/
  46. crate-loading/
  47. crate-name-priority/
  48. cross-lang-lto/
  49. cross-lang-lto-clang/
  50. cross-lang-lto-pgo-smoketest-clang/
  51. cross-lang-lto-riscv-abi/
  52. cross-lang-lto-upstream-rlibs/
  53. CURRENT_RUSTC_VERSION/
  54. debug-assertions/
  55. debugger-visualizer-dep-info/
  56. dep-graph/
  57. dep-info/
  58. dep-info-doesnt-run-much/
  59. dep-info-spaces/
  60. deref-impl-rustdoc-ice/
  61. doctests-keep-binaries/
  62. doctests-keep-binaries-2024/
  63. doctests-merge/
  64. doctests-runtool/
  65. dos-device-input/
  66. dump-ice-to-disk/
  67. dump-mono-stats/
  68. duplicate-output-flavors/
  69. dylib-chain/
  70. dylib-soname/
  71. emit/
  72. emit-named-files/
  73. emit-path-unhashed/
  74. emit-shared-files/
  75. emit-stack-sizes/
  76. emit-to-stdout/
  77. env-dep-info/
  78. error-found-staticlib-instead-crate/
  79. error-writing-dependencies/
  80. exit-code/
  81. export-executable-symbols/
  82. extern-diff-internal-name/
  83. extern-flag-disambiguates/
  84. extern-flag-fun/
  85. extern-flag-pathless/
  86. extern-flag-rename-transitive/
  87. extern-fn-explicit-align/
  88. extern-fn-generic/
  89. extern-fn-mangle/
  90. extern-fn-reachable/
  91. extern-fn-slice-no-ice/
  92. extern-fn-struct-passing-abi/
  93. extern-fn-with-extern-types/
  94. extern-fn-with-packed-struct/
  95. extern-fn-with-union/
  96. extern-multiple-copies/
  97. extern-multiple-copies2/
  98. extern-overrides-distribution/
  99. external-crate-panic-handle-no-lint/
  100. extra-filename-with-temp-outputs/
  101. fmt-write-bloat/
  102. forced-unwind-terminate-pof/
  103. foreign-double-unwind/
  104. foreign-exceptions/
  105. foreign-rust-exceptions/
  106. glibc-staticlib-args/
  107. ice-dep-cannot-find-dep/
  108. ice-static-mir/
  109. inaccessible-temp-dir/
  110. include-all-symbols-linking/
  111. include-bytes-deps/
  112. incr-add-rust-src-component/
  113. incr-foreign-head-span/
  114. incr-prev-body-beyond-eof/
  115. incr-test-moved-file/
  116. incremental-debugger-visualizer/
  117. incremental-session-fail/
  118. inline-always-many-cgu/
  119. interdependent-c-libraries/
  120. intrinsic-unreachable/
  121. invalid-library/
  122. invalid-so/
  123. invalid-staticlib/
  124. invalid-symlink-search-path/
  125. invalid-tmpdir-env-var/
  126. issue-107495-archive-permissions/
  127. issue-125484-used-dependencies/
  128. issue-84395-lto-embed-bitcode/
  129. jobserver-error/
  130. json-error-no-offset/
  131. lib-trait-for-trait-no-ice/
  132. libs-through-symlinks/
  133. libtest-json/
  134. libtest-junit/
  135. libtest-padding/
  136. libtest-thread-limit/
  137. link-arg/
  138. link-args-order/
  139. link-cfg/
  140. link-dedup/
  141. link-eh-frame-terminator/
  142. link-framework/
  143. link-native-static-lib-to-dylib/
  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. mte-ffi/
  177. multiple-emits/
  178. naked-symbol-visibility/
  179. native-lib-load-order/
  180. native-link-modifier-bundle/
  181. native-link-modifier-verbatim-linker/
  182. native-link-modifier-verbatim-rustc/
  183. native-link-modifier-whole-archive/
  184. no-alloc-shim/
  185. no-builtins-attribute/
  186. no-builtins-lto/
  187. no-cdylib-as-rdylib/
  188. no-duplicate-libs/
  189. no-input-file/
  190. no-intermediate-extras/
  191. non-pie-thread-local/
  192. non-unicode-env/
  193. non-unicode-in-incremental-dir/
  194. notify-all-emit-artifacts/
  195. obey-crate-type-flag/
  196. optimization-remarks-dir/
  197. optimization-remarks-dir-pgo/
  198. output-filename-conflicts-with-directory/
  199. output-filename-overwrites-input/
  200. output-type-permutations/
  201. output-with-hyphens/
  202. override-aliased-flags/
  203. overwrite-input/
  204. panic-abort-eh_frame/
  205. panic-impl-transitive/
  206. parallel-rustc-no-overwrite/
  207. pass-linker-flags/
  208. pass-linker-flags-flavor/
  209. pass-linker-flags-from-dep/
  210. pass-non-c-like-enum-to-c/
  211. pdb-alt-path/
  212. pdb-buildinfo-cl-cmd/
  213. pgo-branch-weights/
  214. pgo-gen/
  215. pgo-gen-lto/
  216. pgo-gen-no-imp-symbols/
  217. pgo-indirect-call-promotion/
  218. pgo-use/
  219. pointer-auth-link-with-c/
  220. prefer-dylib/
  221. prefer-rlib/
  222. pretty-print-to-file/
  223. pretty-print-with-dep-file/
  224. print-cfg/
  225. print-check-cfg/
  226. print-native-static-libs/
  227. print-target-list/
  228. print-to-output/
  229. proc-macro-init-order/
  230. proc-macro-three-crates/
  231. profile/
  232. prune-link-args/
  233. raw-dylib-alt-calling-convention/
  234. raw-dylib-c/
  235. raw-dylib-cross-compilation/
  236. raw-dylib-custom-dlltool/
  237. raw-dylib-import-name-type/
  238. raw-dylib-inline-cross-dylib/
  239. raw-dylib-link-ordinal/
  240. raw-dylib-stdcall-ordinal/
  241. raw-fn-pointer-opt-undefined-behavior/
  242. reachable-extern-fn-available-lto/
  243. redundant-libs/
  244. relocation-model/
  245. relro-levels/
  246. remap-path-prefix/
  247. remap-path-prefix-dwarf/
  248. repr128-dwarf/
  249. reproducible-build/
  250. reproducible-build-2/
  251. reset-codegen-1/
  252. resolve-rename/
  253. return-non-c-like-enum/
  254. return-non-c-like-enum-from-c/
  255. rlib-chain/
  256. rlib-format-packed-bundled-libs/
  257. rlib-format-packed-bundled-libs-2/
  258. rlib-format-packed-bundled-libs-3/
  259. rmeta-preferred/
  260. run-in-tmpdir-self-test/
  261. rust-lld/
  262. rust-lld-by-default-beta-stable/
  263. rust-lld-by-default-nightly/
  264. rust-lld-compress-debug-sections/
  265. rust-lld-custom-target/
  266. rustc-macro-dep-files/
  267. rustdoc-cfgspec-parsing/
  268. rustdoc-default-output/
  269. rustdoc-determinism/
  270. rustdoc-error-lines/
  271. rustdoc-io-error/
  272. rustdoc-map-file/
  273. rustdoc-output-path/
  274. rustdoc-scrape-examples-invalid-expr/
  275. rustdoc-scrape-examples-macros/
  276. rustdoc-scrape-examples-multiple/
  277. rustdoc-scrape-examples-ordering/
  278. rustdoc-scrape-examples-remap/
  279. rustdoc-scrape-examples-test/
  280. rustdoc-scrape-examples-whitespace/
  281. rustdoc-shared-flags/
  282. rustdoc-target-spec-json-path/
  283. rustdoc-test-args/
  284. rustdoc-themes/
  285. rustdoc-verify-output-files/
  286. rustdoc-with-out-dir-option/
  287. rustdoc-with-output-option/
  288. rustdoc-with-short-out-dir-option/
  289. sanitizer-cdylib-link/
  290. sanitizer-dylib-link/
  291. sanitizer-staticlib-link/
  292. separate-link/
  293. separate-link-fail/
  294. sepcomp-cci-copies/
  295. sepcomp-inlining/
  296. sepcomp-separate/
  297. share-generics-dylib/
  298. share-generics-export-again/
  299. short-ice/
  300. silly-file-names/
  301. simd-ffi/
  302. split-debuginfo/
  303. stable-symbol-names/
  304. static-dylib-by-default/
  305. static-extern-type/
  306. static-pie/
  307. static-unwinding/
  308. staticlib-blank-lib/
  309. staticlib-dylib-linkage/
  310. std-core-cycle/
  311. stdin-rustc/
  312. stdin-rustdoc/
  313. suspicious-library/
  314. symbol-mangling-hashed/
  315. symbol-visibility/
  316. symbols-include-type-name/
  317. symlinked-extern/
  318. symlinked-libraries/
  319. symlinked-rlib/
  320. sysroot-crates-are-unstable/
  321. target-cpu-native/
  322. target-specs/
  323. target-without-atomic-cas/
  324. test-benches/
  325. test-harness/
  326. textrel-on-minimal-lib/
  327. thumb-none-cortex-m/
  328. thumb-none-qemu/
  329. track-path-dep-info/
  330. track-pgo-dep-info/
  331. translation/
  332. type-mismatch-same-crate-name/
  333. unknown-mod-stdin/
  334. unstable-flag-required/
  335. use-suggestions-rust-2018/
  336. used/
  337. used-cdylib-macos/
  338. version-verbose-commit-hash/
  339. volatile-intrinsics/
  340. wasm-custom-section/
  341. wasm-custom-sections-opt/
  342. wasm-exceptions-nostd/
  343. wasm-export-all-symbols/
  344. wasm-import-module/
  345. wasm-override-linker/
  346. wasm-panic-small/
  347. wasm-spurious-import/
  348. wasm-stringify-ints-small/
  349. wasm-symbols-different-module/
  350. wasm-symbols-not-exported/
  351. wasm-symbols-not-imported/
  352. weird-output-filenames/
  353. windows-binary-no-external-deps/
  354. windows-safeseh/
  355. windows-spawn/
  356. windows-ws2_32/
  357. x86_64-fortanix-unknown-sgx-lvi/
  358. zero-extend-abi-param-passing/
  359. README.md
  360. 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.

Formatting

Note that files under tests/ are not formatted by ./x fmt, use rustfmt tests/path/to/file.rs to format a specific file if desired.