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