Skip to content

0.8.0: where a case runs, stated by the case; capabilities answered by the program - #17

Merged
Sunrisepeak merged 1 commit into
mainfrom
feat/0.8.0-platforms
Nov 13, 2026
Merged

Sunrisepeak merged 1 commit into
mainfrom
feat/0.8.0-platforms

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

Summary

  • only{} / except{}: a case or a suite states the platforms and architectures (mcpplibs.os) it runs on; elsewhere it is skipped with one reason, only on windows (this host: linux x86_64). Suite and case narrow together. The Bash adapter (--only, --except), the Python adapter (only=, excepted=) and the C ABI (mtest_case_only, mtest_case_except) state the same; the engine skips a listed case outside its places without starting it.
  • Compile-time selection without macros: mtest re-exports platform, architecture, can_run_on, host and on<P> from mcpplibs.os. on<platform::windows>([&](auto) { ... }) is discarded by a build for another platform; an ok image decides when it is loaded (AGENTS.md idea 6).
  • capability: what a machine can do, declared once in code by the tests of [capabilities] (system, architecture, programs, path globs, a command, environment, all/none) and a function; answered once per process by the program, under any runner (mtest, mcpp test, the program alone). A capability is an attribute ("links"_test[gcc], tag requires:gcc); a missing one skips with missing capability: gcc (no g++ on PATH).
  • Protocol (P3.3, optional, additive): a case event may carry reason (with expect: skip), only, except, capabilities. The schema states them; the conformance suite checks them of every level-3 implementation (placed in each fixture).
  • Engine: a capability word the program answers needs no [capabilities] entry and is recorded in the run; mtest ci coverage requires a case stating only to pass on each of its places a collected run covered, and some run to have been on one.

Design record: .agents/docs/2026-11-08-mtest-design.md section 14.

Verification (local, linux x86_64)

  • mcpp test -p mcpplibs.mtest (new lib/tests/places.cpp, 5 cases), -p mcpplibs.mtest.manifest, -p mtest.mtest (52 cases, 3 new), -p conformance.
  • Conformance against every implementation: Bash, Python, C ABI 14/14; GoogleTest (L1) 10 passed, 4 skipped.
  • The library, the engine and conformance as x86_64-openkal images.
  • mtest run over mtest's own programs and mtest gate --set full; clang-format 22.1.8 clean.

…y the program

- only{} and except{} state the platforms and architectures of mcpplibs.os a case or a suite
  runs on; elsewhere it is skipped with one reason. The script adapters and the C ABI state
  the same; the engine skips a listed case outside its places without starting it.
- mtest re-exports mcpplibs.os's platform, architecture, can_run_on, host and on<P>: code for
  one platform is selected when it is compiled, and an ok image decides when it is loaded.
- capability declares what a machine can do in code, by the tests of [capabilities] and a
  function; the program answers it once per process under any runner, and a case lacking it
  is skipped. The engine takes the program's answers and records them.
- A case event may carry reason, only, except and capabilities (P3.3; schema, conformance).
- mtest ci coverage requires a case to pass on each of its places a collected run covered.
@Sunrisepeak
Sunrisepeak merged commit 999c16b into main Nov 13, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant