tree: 2067d5c13b25b83d64492b41aa93d7b41ec8b8f7 [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. deref-impl-rustdoc-ice/
  59. doctests-keep-binaries/
  60. doctests-keep-binaries-2024/
  61. doctests-merge/
  62. doctests-runtool/
  63. dos-device-input/
  64. dump-ice-to-disk/
  65. dump-mono-stats/
  66. duplicate-output-flavors/
  67. dylib-chain/
  68. dylib-soname/
  69. emit/
  70. emit-named-files/
  71. emit-path-unhashed/
  72. emit-shared-files/
  73. emit-stack-sizes/
  74. emit-to-stdout/
  75. env-dep-info/
  76. error-found-staticlib-instead-crate/
  77. error-writing-dependencies/
  78. exit-code/
  79. export-executable-symbols/
  80. extern-diff-internal-name/
  81. extern-flag-disambiguates/
  82. extern-flag-fun/
  83. extern-flag-pathless/
  84. extern-flag-rename-transitive/
  85. extern-fn-explicit-align/
  86. extern-fn-generic/
  87. extern-fn-mangle/
  88. extern-fn-reachable/
  89. extern-fn-slice-no-ice/
  90. extern-fn-struct-passing-abi/
  91. extern-fn-with-extern-types/
  92. extern-fn-with-packed-struct/
  93. extern-fn-with-union/
  94. extern-multiple-copies/
  95. extern-multiple-copies2/
  96. extern-overrides-distribution/
  97. external-crate-panic-handle-no-lint/
  98. extra-filename-with-temp-outputs/
  99. fmt-write-bloat/
  100. forced-unwind-terminate-pof/
  101. foreign-double-unwind/
  102. foreign-exceptions/
  103. foreign-rust-exceptions/
  104. glibc-staticlib-args/
  105. ice-dep-cannot-find-dep/
  106. ice-static-mir/
  107. inaccessible-temp-dir/
  108. include-all-symbols-linking/
  109. include-bytes-deps/
  110. incr-add-rust-src-component/
  111. incr-foreign-head-span/
  112. incr-prev-body-beyond-eof/
  113. incr-test-moved-file/
  114. incremental-debugger-visualizer/
  115. incremental-session-fail/
  116. inline-always-many-cgu/
  117. interdependent-c-libraries/
  118. intrinsic-unreachable/
  119. invalid-library/
  120. invalid-so/
  121. invalid-staticlib/
  122. invalid-symlink-search-path/
  123. invalid-tmpdir-env-var/
  124. issue-107495-archive-permissions/
  125. issue-125484-used-dependencies/
  126. issue-84395-lto-embed-bitcode/
  127. jobserver-error/
  128. json-error-no-offset/
  129. lib-trait-for-trait-no-ice/
  130. libs-through-symlinks/
  131. libtest-json/
  132. libtest-junit/
  133. libtest-padding/
  134. libtest-thread-limit/
  135. link-arg/
  136. link-args-order/
  137. link-cfg/
  138. link-dedup/
  139. link-eh-frame-terminator/
  140. link-framework/
  141. link-native-static-lib-to-dylib/
  142. link-path-order/
  143. linkage-attr-on-static/
  144. llvm-ident/
  145. llvm-outputs/
  146. long-linker-command-lines/
  147. long-linker-command-lines-cmd-exe/
  148. longjmp-across-rust/
  149. ls-metadata/
  150. lto-avoid-object-duplication/
  151. lto-dylib-dep/
  152. lto-empty/
  153. lto-linkage-used-attr/
  154. lto-no-link-whole-rlib/
  155. lto-readonly-lib/
  156. lto-smoke/
  157. lto-smoke-c/
  158. macos-deployment-target/
  159. macos-fat-archive/
  160. manual-crate-name/
  161. manual-link/
  162. many-crates-but-no-match/
  163. metadata-dep-info/
  164. metadata-flag-frobs-symbols/
  165. metadata-only-crate-no-ice/
  166. min-global-align/
  167. mingw-export-call-convention/
  168. mismatching-target-triples/
  169. missing-crate-dependency/
  170. mixing-deps/
  171. mixing-formats/
  172. mixing-libs/
  173. moved-src-dir-fingerprint-ice/
  174. mte-ffi/
  175. multiple-emits/
  176. naked-symbol-visibility/
  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-cfg/
  223. print-check-cfg/
  224. print-native-static-libs/
  225. print-target-list/
  226. print-to-output/
  227. proc-macro-init-order/
  228. proc-macro-three-crates/
  229. profile/
  230. prune-link-args/
  231. raw-dylib-alt-calling-convention/
  232. raw-dylib-c/
  233. raw-dylib-cross-compilation/
  234. raw-dylib-custom-dlltool/
  235. raw-dylib-import-name-type/
  236. raw-dylib-inline-cross-dylib/
  237. raw-dylib-link-ordinal/
  238. raw-dylib-stdcall-ordinal/
  239. raw-fn-pointer-opt-undefined-behavior/
  240. reachable-extern-fn-available-lto/
  241. redundant-libs/
  242. relocation-model/
  243. relro-levels/
  244. remap-path-prefix/
  245. remap-path-prefix-dwarf/
  246. repr128-dwarf/
  247. reproducible-build/
  248. reproducible-build-2/
  249. reset-codegen-1/
  250. resolve-rename/
  251. return-non-c-like-enum/
  252. return-non-c-like-enum-from-c/
  253. rlib-chain/
  254. rlib-format-packed-bundled-libs/
  255. rlib-format-packed-bundled-libs-2/
  256. rlib-format-packed-bundled-libs-3/
  257. rmeta-preferred/
  258. run-in-tmpdir-self-test/
  259. rust-lld/
  260. rust-lld-by-default-beta-stable/
  261. rust-lld-by-default-nightly/
  262. rust-lld-compress-debug-sections/
  263. rust-lld-custom-target/
  264. rustc-macro-dep-files/
  265. rustdoc-cfgspec-parsing/
  266. rustdoc-default-output/
  267. rustdoc-determinism/
  268. rustdoc-error-lines/
  269. rustdoc-io-error/
  270. rustdoc-map-file/
  271. rustdoc-output-path/
  272. rustdoc-output-stdout/
  273. rustdoc-scrape-examples-invalid-expr/
  274. rustdoc-scrape-examples-macros/
  275. rustdoc-scrape-examples-multiple/
  276. rustdoc-scrape-examples-ordering/
  277. rustdoc-scrape-examples-remap/
  278. rustdoc-scrape-examples-test/
  279. rustdoc-scrape-examples-whitespace/
  280. rustdoc-shared-flags/
  281. rustdoc-target-spec-json-path/
  282. rustdoc-test-args/
  283. rustdoc-themes/
  284. rustdoc-verify-output-files/
  285. rustdoc-with-out-dir-option/
  286. rustdoc-with-output-option/
  287. rustdoc-with-short-out-dir-option/
  288. sanitizer-cdylib-link/
  289. sanitizer-dylib-link/
  290. sanitizer-staticlib-link/
  291. separate-link/
  292. separate-link-fail/
  293. sepcomp-cci-copies/
  294. sepcomp-inlining/
  295. sepcomp-separate/
  296. share-generics-dylib/
  297. share-generics-export-again/
  298. short-ice/
  299. silly-file-names/
  300. simd-ffi/
  301. split-debuginfo/
  302. stable-symbol-names/
  303. static-dylib-by-default/
  304. static-extern-type/
  305. static-pie/
  306. static-unwinding/
  307. staticlib-blank-lib/
  308. staticlib-dylib-linkage/
  309. staticlib-thin-archive/
  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.