Skip to content

Commit b55f8af

Browse files
authored
mtest 0.11.0 and mcpplibs.mtest.doctest: steps, one budget, jitter, the machine's class, budgets and ledgers in the gate, and doctest under the protocol (#864)
1 parent d6c6817 commit b55f8af

9 files changed

Lines changed: 164 additions & 0 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99

1010
### Added
1111

12+
- **mtest 0.11.0(mcpplibs.mtest、.manifest、.gtest、.capi)与新包 mcpplibs.mtest.doctest。** 协议的 `step` 与 `exercise` 事件(P5.6);
13+
用例结束时检查它启动的进程与诊断行;机器的一份预算(O11)与抖动(O12);运行记录机器的类别;`[budget]` 与 `[ledger.*]`
14+
由门禁判定;GCC 上一个文件的首个用例与期望由 689 ms 降为 265 ms。`mcpplibs.mtest.doctest` 是 doctest 的协议适配器(1 级),
15+
doctest 的实现与入口在包中编译一次,测试文件只包含头文件(mcpp-community/mtest#26)。成员 tests/examples/mtest-doctest。
1216
- **mcpplibs.mwrap.slint 1.19.0.2 与 mcpplibs.slintgen 1.19.0.2:规则的三个名字合为一个名字的三种拼写,使用方只依赖封装包。** 包 `mcpplibs.slintgen`、模块 `mcpp.mcpplibs.slintgen`、命名空间 `mcpp::mcpplibs::slintgen`(与 mcpplibs.openkal-bind 同形,SPEC-007 R9.6);规则不再带 feature,`.slint` 文件是 `options::sources`,封装包 reexport 规则与 SDK,工程的 `mcpp.toml` 只需 `mcpplibs.mwrap.slint`,不需要 `[build-dependencies]`,`[build] sources` 里也不再列 `.slint`。1.19.0.1(模块 `slint.mcpp.plugins` 加 `features = ["slint"]`)保持已发布的字节。
1317
- **mcpplibs.mwrap.slint 1.19.0.1:slint-m,Slint 作为 C++23 模块;mcpplibs.slintgen 1.19.0.1:构建规则,模块 `slint.mcpp.plugins`。** 模块 `mcpplibs.mwrap.slint`(slint、slint::language)、`.interpreter`、`.platform`(仅 Clang;GCC 16 在包着 `slint-platform.h` 的模块上 ICE,故以文本 `#include` 提供)与 `.macros`(13 个 `SLINT_FEATURE_*` 常量),导出面由 SDK 头文件的 AST 生成并审计;链接 compat.slint 1.19.0。规则包 slintgen(同一归档的 `rules/`,与 grpcgen 同形)为每个 `.slint` 文件运行 `slint-compiler`(上游 `slint_target_sources` 的选项、每个输入一条带 depfile 的 action),设置 `module` 后每个文件还生成一个模块单元(`import app.ui;`);工程在 `[build-dependencies]` 写 `features = ["slint"]` 以认领 `.slint`。模块以库名命名而不用 `mcpp.plugins.*`(R9.6 把它留给 mcpp 命名空间,索引不收录此类包);1.19.0 已打标签与镜像但未收录,改名以修订号 1.19.0.1 发布。成员 tests/mwrap/slint-ui;默认模板 `hello`(无头时用软件渲染器)。Linux x86_64、macOS arm64、Windows x86_64(compat.slint 的载荷暂无 Linux aarch64)。
1418
- **compat.slint 1.19.0:Slint 的 C++ SDK(`libslint_cpp`、头文件 `slint/`、`slint-compiler`),上游 CMake 的桌面默认功能集(GPL-3.0-only / Royalty-free-2.0 / Software-3.0 三选一)。** 载荷是生态里的 `xim:slint`(xlings-res/slint,GitHub 与 GitCode 逐字节相同;Linux x86_64、macOS arm64、Windows x86_64),由发布 tag 经 cargo 按默认功能集构建:Linux 上 `libslint_cpp` 只 NEEDED fontconfig 与 C 运行时(X11、Wayland、GL 均 dlopen)。描述符把载荷的 include、lib(Windows 为 bin 的 DLL)与 `slint-compiler` 放进包的目录,`SLINT_FEATURE_*` 由 `<slint.h>` 的默认功能集定义。成员 tests/examples/slint:SharedString、VectorModel、Color,解释器编译一段源码并在无头平台上驱动组件。Linux aarch64 暂缺:`xim:fontconfig` 尚无 aarch64 载荷。

‎mcpp.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ members = [
145145
"tests/examples/mio",
146146
"tests/examples/mtest",
147147
"tests/examples/mtest-capi",
148+
"tests/examples/mtest-doctest",
148149
"tests/examples/mtest-gtest",
149150
"tests/examples/mtest-manifest",
150151
"tests/examples/muduo",

‎pkgs/m/mcpplibs.mtest.capi.lua‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ package = {
2121

2222
xpm = {
2323
linux = {
24+
["0.11.0"] = {
25+
url = {
26+
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.0.tar.gz",
27+
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.0/mtest-v0.11.0.tar.gz",
28+
},
29+
sha256 = "457635770e34e1915b0ed87032c12f435f45a1477caaa60a4ffe9da56da7d398",
30+
},
2431
["0.10.0"] = {
2532
url = {
2633
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.10.0.tar.gz",
@@ -156,6 +163,13 @@ package = {
156163
},
157164
},
158165
macosx = {
166+
["0.11.0"] = {
167+
url = {
168+
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.0.tar.gz",
169+
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.0/mtest-v0.11.0.tar.gz",
170+
},
171+
sha256 = "457635770e34e1915b0ed87032c12f435f45a1477caaa60a4ffe9da56da7d398",
172+
},
159173
["0.10.0"] = {
160174
url = {
161175
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.10.0.tar.gz",
@@ -291,6 +305,13 @@ package = {
291305
},
292306
},
293307
windows = {
308+
["0.11.0"] = {
309+
url = {
310+
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.0.tar.gz",
311+
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.0/mtest-v0.11.0.tar.gz",
312+
},
313+
sha256 = "457635770e34e1915b0ed87032c12f435f45a1477caaa60a4ffe9da56da7d398",
314+
},
294315
["0.10.0"] = {
295316
url = {
296317
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.10.0.tar.gz",

‎pkgs/m/mcpplibs.mtest.doctest.lua‎

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
-- mcpplibs.mtest.doctest --- doctest speaking the mtest test protocol.
2+
--
3+
-- A package of mcpp-community/mtest (one tag, one archive): a test main that
4+
-- lists, selects and reports doctest's cases by the protocol, level 1, and doctest's
5+
-- implementation compiled once in the package (mtest 0.11.0).
6+
package = {
7+
spec = "1",
8+
namespace = "mcpplibs.mtest",
9+
name = "doctest",
10+
description = "doctest speaking the mtest test protocol: doctest's implementation and a test main that lists, selects and reports its cases",
11+
licenses = {"Apache-2.0"},
12+
repo = "https://github.com/mcpp-community/mtest",
13+
type = "package",
14+
15+
extensions = {
16+
autoupdate = {
17+
tag = "v${version}",
18+
url = "https://github.com/mcpp-community/mtest/archive/refs/tags/${tag}.tar.gz",
19+
},
20+
},
21+
22+
xpm = {
23+
linux = {
24+
["0.11.0"] = {
25+
url = {
26+
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.0.tar.gz",
27+
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.0/mtest-v0.11.0.tar.gz",
28+
},
29+
sha256 = "457635770e34e1915b0ed87032c12f435f45a1477caaa60a4ffe9da56da7d398",
30+
},
31+
},
32+
macosx = {
33+
["0.11.0"] = {
34+
url = {
35+
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.0.tar.gz",
36+
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.0/mtest-v0.11.0.tar.gz",
37+
},
38+
sha256 = "457635770e34e1915b0ed87032c12f435f45a1477caaa60a4ffe9da56da7d398",
39+
},
40+
},
41+
windows = {
42+
["0.11.0"] = {
43+
url = {
44+
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.0.tar.gz",
45+
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.0/mtest-v0.11.0.tar.gz",
46+
},
47+
sha256 = "457635770e34e1915b0ed87032c12f435f45a1477caaa60a4ffe9da56da7d398",
48+
},
49+
},
50+
},
51+
52+
mcpp = "*/adapters/doctest/mcpp.toml",
53+
}

‎pkgs/m/mcpplibs.mtest.gtest.lua‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ package = {
2020

2121
xpm = {
2222
linux = {
23+
["0.11.0"] = {
24+
url = {
25+
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.0.tar.gz",
26+
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.0/mtest-v0.11.0.tar.gz",
27+
},
28+
sha256 = "457635770e34e1915b0ed87032c12f435f45a1477caaa60a4ffe9da56da7d398",
29+
},
2330
["0.10.0"] = {
2431
url = {
2532
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.10.0.tar.gz",
@@ -155,6 +162,13 @@ package = {
155162
},
156163
},
157164
macosx = {
165+
["0.11.0"] = {
166+
url = {
167+
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.0.tar.gz",
168+
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.0/mtest-v0.11.0.tar.gz",
169+
},
170+
sha256 = "457635770e34e1915b0ed87032c12f435f45a1477caaa60a4ffe9da56da7d398",
171+
},
158172
["0.10.0"] = {
159173
url = {
160174
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.10.0.tar.gz",
@@ -290,6 +304,13 @@ package = {
290304
},
291305
},
292306
windows = {
307+
["0.11.0"] = {
308+
url = {
309+
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.0.tar.gz",
310+
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.0/mtest-v0.11.0.tar.gz",
311+
},
312+
sha256 = "457635770e34e1915b0ed87032c12f435f45a1477caaa60a4ffe9da56da7d398",
313+
},
293314
["0.10.0"] = {
294315
url = {
295316
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.10.0.tar.gz",

‎pkgs/m/mcpplibs.mtest.manifest.lua‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ package = {
2222

2323
xpm = {
2424
linux = {
25+
["0.11.0"] = {
26+
url = {
27+
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.0.tar.gz",
28+
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.0/mtest-v0.11.0.tar.gz",
29+
},
30+
sha256 = "457635770e34e1915b0ed87032c12f435f45a1477caaa60a4ffe9da56da7d398",
31+
},
2532
["0.10.0"] = {
2633
url = {
2734
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.10.0.tar.gz",
@@ -143,6 +150,13 @@ package = {
143150
},
144151
},
145152
macosx = {
153+
["0.11.0"] = {
154+
url = {
155+
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.0.tar.gz",
156+
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.0/mtest-v0.11.0.tar.gz",
157+
},
158+
sha256 = "457635770e34e1915b0ed87032c12f435f45a1477caaa60a4ffe9da56da7d398",
159+
},
146160
["0.10.0"] = {
147161
url = {
148162
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.10.0.tar.gz",
@@ -264,6 +278,13 @@ package = {
264278
},
265279
},
266280
windows = {
281+
["0.11.0"] = {
282+
url = {
283+
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.0.tar.gz",
284+
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.0/mtest-v0.11.0.tar.gz",
285+
},
286+
sha256 = "457635770e34e1915b0ed87032c12f435f45a1477caaa60a4ffe9da56da7d398",
287+
},
267288
["0.10.0"] = {
268289
url = {
269290
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.10.0.tar.gz",

‎pkgs/m/mtest.lua‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@
5252
--
5353
-- 0.10.0 records a timed-out program's processes, asks it to end, and ends what still
5454
-- runs after its grace (`grace`, `timeout_record`).
55+
--
56+
-- 0.11.0 writes a case's steps and the surface it used (P5.6), checks a case's processes
57+
-- and diagnostic lines at its end, holds one budget for the machine (O11), waits at
58+
-- contention points under jitter (O12), records the machine's class, judges [budget] and
59+
-- [ledger.*] in the gate, and costs a file's first case and expectation 265 ms under GCC.
5560
package = {
5661
spec = "1",
5762
namespace = "mcpplibs",
@@ -70,6 +75,13 @@ package = {
7075

7176
xpm = {
7277
linux = {
78+
["0.11.0"] = {
79+
url = {
80+
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.0.tar.gz",
81+
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.0/mtest-v0.11.0.tar.gz",
82+
},
83+
sha256 = "457635770e34e1915b0ed87032c12f435f45a1477caaa60a4ffe9da56da7d398",
84+
},
7385
["0.10.0"] = {
7486
url = {
7587
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.10.0.tar.gz",
@@ -205,6 +217,13 @@ package = {
205217
},
206218
},
207219
macosx = {
220+
["0.11.0"] = {
221+
url = {
222+
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.0.tar.gz",
223+
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.0/mtest-v0.11.0.tar.gz",
224+
},
225+
sha256 = "457635770e34e1915b0ed87032c12f435f45a1477caaa60a4ffe9da56da7d398",
226+
},
208227
["0.10.0"] = {
209228
url = {
210229
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.10.0.tar.gz",
@@ -340,6 +359,13 @@ package = {
340359
},
341360
},
342361
windows = {
362+
["0.11.0"] = {
363+
url = {
364+
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.0.tar.gz",
365+
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.0/mtest-v0.11.0.tar.gz",
366+
},
367+
sha256 = "457635770e34e1915b0ed87032c12f435f45a1477caaa60a4ffe9da56da7d398",
368+
},
343369
["0.10.0"] = {
344370
url = {
345371
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.10.0.tar.gz",
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# mcpplibs.mtest.doctest test project: doctest's cases begun by the adapter's main, which reports
2+
# them by the mtest protocol. The test file includes doctest's header and defines no
3+
# DOCTEST_CONFIG_IMPLEMENT*: the implementation is compiled once, in the adapter.
4+
[package]
5+
name = "mtest-doctest-tests"
6+
version = "0.1.0"
7+
8+
[indices]
9+
# Use the complete candidate built-in index prepared by tests/run_members.sh.
10+
11+
[dev-dependencies]
12+
mcpplibs.mtest.doctest = "0.11.0"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#include <doctest/doctest.h>
2+
TEST_SUITE("arithmetic") {
3+
TEST_CASE("adds") { CHECK(1 + 1 == 2); }
4+
TEST_CASE("multiplies") { CHECK(2 * 3 == 6); }
5+
}

0 commit comments

Comments
 (0)