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