ww: put selected toolchain first in test PATH
This commit is contained in:
19
docs/spec.md
19
docs/spec.md
@@ -757,6 +757,17 @@ remaining separate actions. Reachable dependency initialization consequently
|
||||
observes the tested product's directory; a dependency tested as its own product
|
||||
observes its own directory.
|
||||
|
||||
Every test binary actually started by `ww test` receives one effective uppercase
|
||||
`PATH` whose first element is the canonical absolute directory of the selected
|
||||
WW driver. An absent or empty caller `PATH` yields only that directory; a
|
||||
nonempty effective caller value follows it after `:`. Normal duplicate `PATH=`
|
||||
entries collapse to that one value, using the caller's first effective value as
|
||||
the suffix. This applies to directory products, their dependency initialization,
|
||||
filters and list mode, running retained tests, and the raw single-file
|
||||
compatibility route. It does not apply to build tools, `ww build`, `ww run`,
|
||||
compile-only or assembly-only test requests, no-test products, or later direct
|
||||
execution of a retained binary.
|
||||
|
||||
The same coordinator-executed product reads standard input from the null
|
||||
device. Its first read observes EOF regardless of the terminal, pipe, or file
|
||||
connected to the invoking command. Each parallel product owns a separate null
|
||||
@@ -781,9 +792,11 @@ Relative ordinary files, `testdata`, and writes resolve there for every
|
||||
executing filter or list path. `ww build`, directory `ww test -c` (including
|
||||
`-c -o`), and a no-selected-test directory execute no test child and receive no
|
||||
execution-directory effect. A published test binary invoked directly, and the
|
||||
raw single-file compatibility route, inherit the user's invocation cwd,
|
||||
environment, and three standard descriptors; no package directory, input, or
|
||||
output policy is embedded or forced by the binary.
|
||||
raw single-file compatibility route, inherit the user's invocation cwd and
|
||||
three standard descriptors; no package directory, input, or output policy is
|
||||
embedded or forced by the binary. Directly invoked retained binaries inherit the
|
||||
entire caller environment. Raw single-file tests preserve every caller
|
||||
environment field except the test-only `PATH` transformation above.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user