test: prove package-source test execution cwd
This commit is contained in:
21
docs/spec.md
21
docs/spec.md
@@ -645,6 +645,27 @@ mixed directories are accepted from their selected test files. A directory
|
||||
with no selected test file validates ordinary production but creates no test
|
||||
support, generated main, link, binary, result, or process.
|
||||
|
||||
When `ww test` executes a directory-owned product, the child process working
|
||||
directory is that product's canonical absolute physical package source
|
||||
directory. Its per-run environment has exactly one effective uppercase `PWD`,
|
||||
with that same value. The physical source directory is execution context, not
|
||||
canonical package identity: it does not enter dotted identity, import binding,
|
||||
action identity, mangled symbols, `.wwi`, artifacts, or persistence keys.
|
||||
Production, internal-test, external-test, recompiled-for-test, support, and
|
||||
generated-main actions in the product share the one process context while
|
||||
remaining separate actions. Reachable dependency initialization consequently
|
||||
observes the tested product's directory; a dependency tested as its own product
|
||||
observes its own directory.
|
||||
|
||||
The coordinator does not change its own cwd or environment. Parallel products
|
||||
receive independent child environments and each uses its own source directory.
|
||||
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 and
|
||||
environment; no package directory is embedded or forced by the binary.
|
||||
|
||||
---
|
||||
|
||||
## 11. Concurrency (reserved)
|
||||
|
||||
Reference in New Issue
Block a user