From 33aed189e752128ba3ed4251e36a42dbc8cb8ae1 Mon Sep 17 00:00:00 2001 From: Martin Nordholts <martin.nordholts@codetale.se> Date: Mon, 18 Mar 2024 19:24:17 +0100 Subject: [PATCH] Add basic docs for the new `aux-bin` header --- src/tests/compiletest.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tests/compiletest.md b/src/tests/compiletest.md index 175e23b123..628cd3f74c 100644 --- a/src/tests/compiletest.md +++ b/src/tests/compiletest.md @@ -501,10 +501,11 @@ only running the main `coverage` suite. ## Building auxiliary crates It is common that some tests require additional auxiliary crates to be compiled. -There are two [headers](headers.md) to assist with that: +There are three [headers](headers.md) to assist with that: * `aux-build` * `aux-crate` +* `aux-bin` `aux-build` will build a separate crate from the named source file. The source file should be in a directory called `auxiliary` beside the test file. @@ -529,6 +530,8 @@ For example, `// aux-crate:foo=bar.rs` will compile `auxiliary/bar.rs` and make it available under then name `foo` within the test. This is similar to how Cargo does dependency renaming. +`aux-bin` is similar to `aux-build` but will build a binary instead of a library. The binary will be available in `auxiliary/bin` relative to the working directory of the test. + ### Auxiliary proc-macro If you want a proc-macro dependency, then there currently is some ceremony