rust/tests/run-make
Matthias Krüger 5c3370d684
Rollup merge of #129837 - aDotInTheVoid:test-better-json, r=jieyouxu
Actually parse stdout json, instead of using hacky contains logic.

Fixes up the test added in #128963, to actually parse the stdout to JSON, instead of just checking that it contains `{"`.

CC ``@GuillaumeGomez``

r? ``@jieyouxu``
2024-09-02 04:19:30 +02:00
..
a-b-a-linker-guard
alloc-no-oom-handling
alloc-no-rc
alloc-no-sync
allocator-shim-circular-deps
allow-warnings-cmdline-stability
archive-duplicate-names
arguments-non-c-like-enum remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
artifact-incr-cache
artifact-incr-cache-no-obj
atomic-lock-free
bare-outfile
bin-emit-no-symbols
box-struct-no-segfault
branch-protection-check-IBT Reformat use declarations. 2024-07-29 08:26:52 +10:00
c-dynamic-dylib rewrite c-dynamic-dylib to rmake 2024-07-23 10:31:21 -04:00
c-dynamic-rlib rewrite c-dynamic-dylib to rmake 2024-07-23 10:31:21 -04:00
c-link-to-rust-dylib
c-link-to-rust-staticlib remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
c-link-to-rust-va-list-fn Reformat use declarations. 2024-07-29 08:26:52 +10:00
c-static-dylib
c-static-rlib
c-unwind-abi-catch-lib-panic rewrite export-executable-symbols to rmake 2024-07-26 10:17:39 -04:00
c-unwind-abi-catch-panic
cat-and-grep-sanity-check
cdylib
cdylib-dylib-linkage rewrite cdylib-dylib-linkage to rmake 2024-08-05 10:39:17 -04:00
cdylib-fewer-symbols
clear-error-blank-output
codegen-options-parsing
comment-section remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
compile-stdin
compiler-builtins Reformat use declarations. 2024-07-29 08:26:52 +10:00
compiler-lookup-paths
compiler-lookup-paths-2
compiler-rt-works-on-mingw rewrite incr-foreign-head-span to rmake 2024-07-25 11:08:07 -04:00
compressed-debuginfo remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
compressed-debuginfo-zstd expand zstd debuginfo compression test 2024-08-25 22:17:51 +00:00
const_fn_mir remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
const-prop-lint
core-no-fp-fmt-parse
core-no-oom-handling
cpp-global-destructors rewrite foreign-exceptions to rmake 2024-08-02 10:06:20 -04:00
crate-circular-deps-link rewrite and rename issue-69368 to rmake 2024-07-30 14:44:14 -04:00
crate-data-smoke
crate-hash-rustc-version Reformat use declarations. 2024-07-29 08:26:52 +10:00
crate-loading Fix typo in help diagnostic 2024-08-23 08:21:25 +05:30
crate-name-priority
cross-lang-lto rewrite cross-lang-lto to rmake 2024-07-31 11:33:08 -04:00
cross-lang-lto-clang run cross-lang-lto-pgo-smoketest in CI by renaming it 2024-08-02 11:54:20 -04:00
cross-lang-lto-pgo-smoketest-clang run cross-lang-lto-pgo-smoketest in CI by renaming it 2024-08-02 11:54:20 -04:00
cross-lang-lto-riscv-abi run cross-lang-lto-pgo-smoketest in CI by renaming it 2024-08-02 11:54:20 -04:00
cross-lang-lto-upstream-rlibs rewrite long-linker-command-lines-cmd-exe to rmake 2024-08-06 11:03:18 -04:00
CURRENT_RUSTC_VERSION remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
debug-assertions
debugger-visualizer-dep-info Rename foo.py to my_gdb_script.py 2024-08-22 11:52:21 +10:00
dep-graph
dep-info coalesce dep-info-spaces and dep-info-doesnt-run-much into dep-info 2024-08-15 10:16:30 -04:00
deref-impl-rustdoc-ice About rmake tests 2024-08-15 15:44:29 +02:00
doctests-keep-binaries Reformat use declarations. 2024-07-29 08:26:52 +10:00
doctests-keep-binaries-2024 Ignore cross compile check for tests/run-make/doctests-keep-binaries-2024 test 2024-08-13 20:14:57 +02:00
doctests-merge Run fmt 2024-08-13 20:14:57 +02:00
doctests-runtool Reformat use declarations. 2024-07-29 08:26:52 +10:00
dos-device-input Use path instead of Path in some run-make tests 2024-08-29 10:15:17 -04:00
dump-ice-to-disk tests: disable dump-ice-to-disk for i686-mingw 2024-08-18 09:13:44 +00:00
dump-mono-stats
duplicate-output-flavors
dylib-chain
dylib-soname remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
embed-source-dwarf Add run-make test for -Zembed-source=yes 2024-07-29 12:35:42 +02:00
emit
emit-named-files
emit-path-unhashed
emit-shared-files Use path instead of Path in some run-make tests 2024-08-29 10:15:17 -04:00
emit-stack-sizes
emit-to-stdout
env-dep-info
error-found-staticlib-instead-crate
error-writing-dependencies
exit-code About rmake tests 2024-08-15 15:44:29 +02:00
export-executable-symbols rewrite export-executable-symbols to rmake 2024-07-26 10:17:39 -04:00
extern-diff-internal-name rewrite extern-multiple-copies2 to rmake 2024-07-23 15:08:40 -04:00
extern-flag-disambiguates remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
extern-flag-fun
extern-flag-pathless
extern-flag-rename-transitive
extern-fn-explicit-align
extern-fn-generic
extern-fn-mangle
extern-fn-reachable
extern-fn-slice-no-ice
extern-fn-struct-passing-abi
extern-fn-with-extern-types
extern-fn-with-packed-struct
extern-fn-with-union
extern-multiple-copies rewrite extern-multiple-copies2 to rmake 2024-07-23 15:08:40 -04:00
extern-multiple-copies2 rewrite extern-multiple-copies2 to rmake 2024-07-23 15:08:40 -04:00
extern-overrides-distribution
external-crate-panic-handle-no-lint
extra-filename-with-temp-outputs
fmt-write-bloat Update reason why fmt-write-bloat ignores windows 2024-08-09 21:21:43 +00:00
forced-unwind-terminate-pof
foreign-double-unwind rewrite foreign-exceptions to rmake 2024-08-02 10:06:20 -04:00
foreign-exceptions rewrite foreign-exceptions to rmake 2024-08-02 10:06:20 -04:00
foreign-rust-exceptions rewrite export-executable-symbols to rmake 2024-07-26 10:17:39 -04:00
glibc-staticlib-args
ice-dep-cannot-find-dep remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
ice-static-mir
inaccessible-temp-dir
include-all-symbols-linking
include-bytes-deps
incr-add-rust-src-component
incr-foreign-head-span rewrite incr-foreign-head-span to rmake 2024-07-25 11:08:07 -04:00
incr-prev-body-beyond-eof Reformat use declarations. 2024-07-29 08:26:52 +10:00
incr-test-moved-file remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
incremental-debugger-visualizer remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
incremental-session-fail
inline-always-many-cgu Reformat use declarations. 2024-07-29 08:26:52 +10:00
interdependent-c-libraries rewrite incr-foreign-head-span to rmake 2024-07-25 11:08:07 -04:00
intrinsic-unreachable Reformat use declarations. 2024-07-29 08:26:52 +10:00
invalid-library Reformat use declarations. 2024-07-29 08:26:52 +10:00
invalid-so
invalid-staticlib
invalid-symlink-search-path
invalid-tmpdir-env-var
issue-84395-lto-embed-bitcode
issue-107495-archive-permissions Reformat use declarations. 2024-07-29 08:26:52 +10:00
issue-125484-used-dependencies
jobserver-error
json-error-no-offset Rewrite and rename issue-35164 to rmake 2024-07-26 14:17:11 -04:00
lib-trait-for-trait-no-ice Reformat use declarations. 2024-07-29 08:26:52 +10:00
libs-through-symlinks
libtest-json Port run-make/libtest-json/validate_json.py to Rust 2024-08-17 18:15:38 +10:00
libtest-junit Advise against removing run-make/libtest-junit/validate_junit.py 2024-08-22 12:13:25 +10:00
libtest-padding
libtest-thread-limit Add needs-unwind compiletest directive to libtest-thread-limit 2024-08-29 10:13:48 -04:00
link-arg
link-args-order Enable msvc for link-args-order 2024-08-04 15:09:21 +00:00
link-cfg rewrite link-cfg to rmake 2024-07-29 14:33:54 -04:00
link-dedup run-make: enable msvc for link-dedup 2024-08-04 11:25:48 +00:00
link-eh-frame-terminator rewrite and rename issue-69368 to rmake 2024-07-30 14:44:14 -04:00
link-framework
link-native-static-lib-to-dylib Rename tests/run-make/issue-15460 into tests/run-make/link-native-static-lib-to-dylib 2024-07-23 11:47:11 +02:00
link-path-order
linkage-attr-on-static
llvm-ident
llvm-outputs Reformat use declarations. 2024-07-29 08:26:52 +10:00
long-linker-command-lines rewrite long-linker-command-lines-cmd-exe to rmake 2024-08-06 11:03:18 -04:00
long-linker-command-lines-cmd-exe rewrite long-linker-command-lines-cmd-exe to rmake 2024-08-06 11:03:18 -04:00
longjmp-across-rust
ls-metadata Reformat use declarations. 2024-07-29 08:26:52 +10:00
lto-avoid-object-duplication
lto-dylib-dep
lto-empty
lto-linkage-used-attr
lto-no-link-whole-rlib
lto-readonly-lib remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
lto-smoke
lto-smoke-c
macos-deployment-target
macos-fat-archive
manual-crate-name Use path instead of Path in some run-make tests 2024-08-29 10:15:17 -04:00
manual-link
many-crates-but-no-match
metadata-dep-info
metadata-flag-frobs-symbols
metadata-only-crate-no-ice
min-global-align rewrite no-alloc-shim to rmake 2024-08-14 10:33:56 -04:00
mingw-export-call-convention
mismatching-target-triples
missing-crate-dependency
mixing-deps
mixing-formats
mixing-libs
moved-src-dir-fingerprint-ice
msvc-wholearchive Test wholearchive on rust staticlib 2024-08-19 18:26:55 +00:00
mte-ffi Remove redundant information and simplify only condition 2024-07-31 09:27:48 +01:00
multiple-emits remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
naked-symbol-visibility remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
native-lib-alt-naming linker: Better support alternative static library naming on MSVC 2024-08-27 22:13:31 +03:00
native-lib-load-order
native-link-modifier-bundle rewrite native-link-modifier-bundle to rmake 2024-08-15 10:17:38 -04:00
native-link-modifier-verbatim-linker
native-link-modifier-verbatim-rustc
native-link-modifier-whole-archive rewrite no-builtins-attribute to rmake 2024-07-26 12:07:33 -04:00
no-alloc-shim rewrite no-alloc-shim to rmake 2024-08-14 10:33:56 -04:00
no-builtins-attribute rewrite no-builtins-attribute to rmake 2024-07-26 12:07:33 -04:00
no-builtins-lto
no-cdylib-as-rdylib
no-duplicate-libs Enable msvc for no-duplicate-libs 2024-08-04 02:57:18 +00:00
no-input-file
no-intermediate-extras Reformat use declarations. 2024-07-29 08:26:52 +10:00
non-pie-thread-local
non-unicode-env Reformat use declarations. 2024-07-29 08:26:52 +10:00
non-unicode-in-incremental-dir remove other warnings from rmake tests 2024-08-10 18:16:15 +00:00
notify-all-emit-artifacts
obey-crate-type-flag Reformat use declarations. 2024-07-29 08:26:52 +10:00
optimization-remarks-dir
optimization-remarks-dir-pgo
output-filename-conflicts-with-directory
output-filename-overwrites-input
output-type-permutations remove other warnings from rmake tests 2024-08-10 18:16:15 +00:00
output-with-hyphens
override-aliased-flags
overwrite-input
panic-abort-eh_frame rewrite panic-abort-eh_frame to rmake 2024-07-25 11:17:34 -04:00
panic-impl-transitive
parallel-rustc-no-overwrite Reformat use declarations. 2024-07-29 08:26:52 +10:00
pass-linker-flags
pass-linker-flags-flavor
pass-linker-flags-from-dep
pass-non-c-like-enum-to-c
pdb-alt-path
pdb-buildinfo-cl-cmd rewrite pgo-indirect-call-promotion to rmake 2024-08-07 12:57:34 -04:00
pgo-branch-weights Reformat use declarations. 2024-07-29 08:26:52 +10:00
pgo-gen
pgo-gen-lto rewrite pgo-gen-lto to rmake 2024-08-06 16:35:08 -04:00
pgo-gen-no-imp-symbols
pgo-indirect-call-promotion rewrite pgo-indirect-call-promotion to rmake 2024-08-07 12:57:34 -04:00
pgo-use
pointer-auth-link-with-c
prefer-dylib
prefer-rlib
pretty-print-to-file
pretty-print-with-dep-file Use path instead of Path in some run-make tests 2024-08-29 10:15:17 -04:00
print-cfg tests/run-make: add missing needs-llvm-components 2024-08-26 18:20:32 +08:00
print-check-cfg remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
print-native-static-libs remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
print-target-list tests/run-make: add missing needs-llvm-components 2024-08-26 18:20:32 +08:00
print-to-output tests/run-make: add missing needs-llvm-components 2024-08-26 18:20:32 +08:00
proc-macro-init-order
proc-macro-three-crates
profile Use path instead of Path in some run-make tests 2024-08-29 10:15:17 -04:00
prune-link-args
raw-dylib-alt-calling-convention rewrite redundant-libs to rmake 2024-08-05 10:11:53 -04:00
raw-dylib-c rewrite redundant-libs to rmake 2024-08-05 10:11:53 -04:00
raw-dylib-cross-compilation
raw-dylib-custom-dlltool
raw-dylib-import-name-type rewrite raw-dylib-stdcall-ordinal to rmake 2024-07-29 10:58:28 -04:00
raw-dylib-inline-cross-dylib
raw-dylib-link-ordinal rewrite raw-dylib-stdcall-ordinal to rmake 2024-07-29 10:58:28 -04:00
raw-dylib-stdcall-ordinal rewrite raw-dylib-stdcall-ordinal to rmake 2024-07-29 10:58:28 -04:00
raw-fn-pointer-opt-undefined-behavior
reachable-extern-fn-available-lto
redundant-libs remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
relocation-model
relro-levels Reformat use declarations. 2024-07-29 08:26:52 +10:00
remap-path-prefix
remap-path-prefix-dwarf rewrite remap-path-prefix-dwarf to rmake 2024-08-12 10:27:20 -04:00
remove-dir-all-race fix: fs::remove_dir_all: treat ENOENT as success 2024-08-22 14:18:42 -04:00
repr128-dwarf Reformat use declarations. 2024-07-29 08:26:52 +10:00
reproducible-build massive refactor of reproducible-build test 2024-08-16 10:10:25 -04:00
reproducible-build-2 remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
reset-codegen-1 Use path instead of Path in some run-make tests 2024-08-29 10:15:17 -04:00
resolve-rename Reformat use declarations. 2024-07-29 08:26:52 +10:00
return-non-c-like-enum
return-non-c-like-enum-from-c
rlib-chain
rlib-format-packed-bundled-libs rewrite native-link-modifier-bundle to rmake 2024-08-15 10:17:38 -04:00
rlib-format-packed-bundled-libs-2 assert_stdout_contains_regex in run_make_support + variations 2024-07-26 15:20:01 -04:00
rlib-format-packed-bundled-libs-3 remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
rmeta-preferred
run-in-tmpdir-self-test remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
rust-lld remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
rust-lld-by-default-beta-stable Reformat use declarations. 2024-07-29 08:26:52 +10:00
rust-lld-by-default-nightly remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
rust-lld-custom-target remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
rustc-macro-dep-files
rustdoc-cfgspec-parsing
rustdoc-default-output rewrite rustdoc-default-output to rmake 2024-08-02 11:50:19 -04:00
rustdoc-determinism Use path instead of Path in some run-make tests 2024-08-29 10:15:17 -04:00
rustdoc-error-lines
rustdoc-io-error About rmake tests 2024-08-15 15:44:29 +02:00
rustdoc-map-file Reexport serde_json crate from run-make-support to give it access to run-make tests 2024-08-16 16:32:07 +02:00
rustdoc-output-path Use path instead of Path in some run-make tests 2024-08-29 10:15:17 -04:00
rustdoc-output-stdout Actually parse stdout json, instead of using hacky contains logic. 2024-08-31 22:08:38 +00:00
rustdoc-scrape-examples-invalid-expr
rustdoc-scrape-examples-macros About rmake tests 2024-08-15 15:44:29 +02:00
rustdoc-scrape-examples-multiple
rustdoc-scrape-examples-ordering
rustdoc-scrape-examples-remap About rmake tests 2024-08-15 15:44:29 +02:00
rustdoc-scrape-examples-test
rustdoc-scrape-examples-whitespace
rustdoc-shared-flags
rustdoc-target-spec-json-path About rmake tests 2024-08-15 15:44:29 +02:00
rustdoc-test-args Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustdoc-themes About rmake tests 2024-08-15 15:44:29 +02:00
rustdoc-verify-output-files Reformat use declarations. 2024-07-29 08:26:52 +10:00
rustdoc-with-out-dir-option About rmake tests 2024-08-15 15:44:29 +02:00
rustdoc-with-output-option
rustdoc-with-short-out-dir-option
sanitizer-cdylib-link rewrite sanitizer-cdylib-link to rmake 2024-07-23 10:26:35 -04:00
sanitizer-dylib-link rewrite sanitizer-dylib-link to rmake 2024-07-23 10:26:35 -04:00
sanitizer-staticlib-link rewrite sanitizer-staticlib-link to rmake 2024-07-26 11:45:19 -04:00
separate-link
separate-link-fail
sepcomp-cci-copies remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
sepcomp-inlining remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
sepcomp-separate remove unused imports from rmake tests 2024-08-10 18:06:10 +00:00
share-generics-dylib rewrite raw-dylib-stdcall-ordinal to rmake 2024-07-29 10:58:28 -04:00
share-generics-export-again
short-ice
silly-file-names
simd-ffi rewrite simd-ffi to rmake 2024-08-05 15:07:33 -04:00
split-debuginfo
stable-symbol-names rewrite stable-symbol-names to rmake 2024-08-01 11:07:04 -04:00
static-dylib-by-default rewrite sanitizer-staticlib-link to rmake 2024-07-26 11:45:19 -04:00
static-extern-type
static-pie Reformat use declarations. 2024-07-29 08:26:52 +10:00
static-unwinding
staticlib-blank-lib
staticlib-dylib-linkage run-make: enable msvc for staticlib-dylib-linkage 2024-08-08 12:17:15 +00:00
staticlib-thin-archive Apply some suggestions to the test rmake file 2024-08-14 16:44:05 +00:00
std-core-cycle
stdin-rustc Reformat use declarations. 2024-07-29 08:26:52 +10:00
stdin-rustdoc Reformat use declarations. 2024-07-29 08:26:52 +10:00
suspicious-library Reformat use declarations. 2024-07-29 08:26:52 +10:00
symbol-mangling-hashed
symbol-visibility Remove skipping symbols with the __imp_ prefix 2024-08-03 22:08:39 +00:00
symbols-include-type-name
symlinked-extern
symlinked-libraries
symlinked-rlib
sysroot-crates-are-unstable Port the sysroot-crates-are-unstable Python script to rmake 2024-08-15 11:44:05 +10:00
target-cpu-native
target-specs
target-without-atomic-cas tests/run-make: add missing needs-llvm-components 2024-08-26 18:20:32 +08:00
test-benches
test-harness
textrel-on-minimal-lib
thumb-none-cortex-m changes after review 2024-08-06 22:08:28 +02:00
thumb-none-qemu changes after review 2024-08-08 10:21:47 +02:00
track-path-dep-info
track-pgo-dep-info
translation
type-mismatch-same-crate-name
unknown-mod-stdin
unstable-flag-required
use-suggestions-rust-2018
used Remove BAR for run-make/used.rs 2024-08-03 13:02:32 +00:00
used-cdylib-macos
version-verbose-commit-hash
volatile-intrinsics Reformat use declarations. 2024-07-29 08:26:52 +10:00
wasm-custom-section Reformat use declarations. 2024-07-29 08:26:52 +10:00
wasm-custom-sections-opt Reformat use declarations. 2024-07-29 08:26:52 +10:00
wasm-exceptions-nostd
wasm-export-all-symbols Reformat use declarations. 2024-07-29 08:26:52 +10:00
wasm-import-module Reformat use declarations. 2024-07-29 08:26:52 +10:00
wasm-override-linker run cross-lang-lto-pgo-smoketest in CI by renaming it 2024-08-02 11:54:20 -04:00
wasm-panic-small
wasm-spurious-import Reformat use declarations. 2024-07-29 08:26:52 +10:00
wasm-stringify-ints-small
wasm-symbols-different-module Reformat use declarations. 2024-07-29 08:26:52 +10:00
wasm-symbols-not-exported Reformat use declarations. 2024-07-29 08:26:52 +10:00
wasm-symbols-not-imported Reformat use declarations. 2024-07-29 08:26:52 +10:00
weird-output-filenames Reformat use declarations. 2024-07-29 08:26:52 +10:00
windows-binary-no-external-deps Reformat use declarations. 2024-07-29 08:26:52 +10:00
windows-safeseh
windows-spawn
windows-ws2_32 Reformat use declarations. 2024-07-29 08:26:52 +10:00
x86_64-fortanix-unknown-sgx-lvi rewrite x86_64-fortanix-unknown-sgx-lvi to rmake 2024-08-22 10:22:17 -04:00
zero-extend-abi-param-passing Enable msvc for zero-extend-abi-param-passing 2024-08-04 02:57:17 +00:00
README.md note that rmake.rs files are not subject to automatic formatting 2024-07-25 12:18:24 -04:00
tools.mk

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.