aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-17 15:58:49 +0000
committer_ov4 <ov4@ov4.org>2026-10-17 15:58:49 +0000
commit7aef18d1d693bcf74fd098f8cf2daaf6eb7fb546 (patch)
treea319f922e5f4a322dd1a50ed93cd483ea651a1d1
parent44e3b4e38808072ac9e605ab5a216ae54db8c5e4 (diff)
docs(tests): document manifest objects for C and C++ fixtures
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
-rw-r--r--AGENTS/TESTING.md2
-rw-r--r--tests/README.md2
2 files changed, 4 insertions, 0 deletions
diff --git a/AGENTS/TESTING.md b/AGENTS/TESTING.md
index 93e7aa3..ac8c458 100644
--- a/AGENTS/TESTING.md
+++ b/AGENTS/TESTING.md
@@ -12,6 +12,8 @@ the reason, line and exact absolute input path must match the same diagnostic.
The harness contract tests reject wrong filenames, filename prefixes and split
reason/location messages.
+Suite i and ii cases may list `objects` as `{source, output}` pairs, for example `lib.c` to `lib.o`. The runner copies the case directory beside the results, builds each object there with the host C (`.c`) or C++ (`.cc`) compiler passed by `--cc` and `--cxx`, and compiles `sources` from the copy so `INCLUDE_OBJ "lib.o"` resolves. Keep C++ objects free of the C++ runtime library: `-r` loads only the C library.
+
Optional manifest fields are `exit_code` for expected program status (default 0) and `timeout` for execution/reference seconds (default 30; file-intensive cases use 180). Compilation has a 120-second timeout. Do not make a known compiler defect pass by changing the expectation, adding an exemption or comparing only a permissive substring of program output.
The Perl runner (`tests/run.pl`) accepts `--case`, `--cpsc`, `--run-mode`, `--perl`, `--reference`, `--seed`, `--count` and `--results`. CMake provides paths, including executable suffixes, and caches `CPSC_TEST_SEED` and `CPSC_TEST_COUNT`. The default seed is HEAD read at execution, not configure time. CI overrides it with the checked-out push SHA. Both native and enabled runner paths are tested independently; NONE skips only runner execution. Windows CI must configure a native `PERL_EXECUTABLE` (Strawberry Perl) because MSYS perl cannot read the native `D:/` drive paths CMake passes.
diff --git a/tests/README.md b/tests/README.md
index a7ebabe..3b9cfc7 100644
--- a/tests/README.md
+++ b/tests/README.md
@@ -30,6 +30,8 @@ In Actions, each compiler platform runs all three suites and summarizes results
For adding cases and runner interfaces, see [AGENTS/TESTING.md](../AGENTS/TESTING.md).
+A case with `objects` in `case.json` builds `.c` and `.cc` files into `.o` files for `INCLUDE_OBJ` (see `i/extern-c-object` and `i/extern-cc-object`). CMake passes the project C and C++ compilers.
+
Multi-file fixtures use a `sources` array in `case.json`, listing all compiler inputs relative to the case directory in command-line order. The default remains `["program.cps"]`. Included libraries live beside the fixture source or in subdirectories; INCLUDE paths stay relative to their including source. Sources are passed separately to both native compilation and the configured runner. Negative cases may add `file` to an error expectation; the reason, line and exact resolved source path must occur on the same diagnostic.
Run the cross-file cases (functions, shared globals, imported types, include cycles, MAIN, exception unwinding and rejection diagnostics) with: