You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
说明文字是 “the files of one directory are one program”。实际行为:tests/<子目录>/ 里的文件合成一个程序;直接放在 tests/ 下的文件仍然一个文件一个程序。一个所有测试都平铺在 tests/ 下的包打开这个键,结果和没打开完全一样,--strict 也没有任何提示——我们第一次用时得出的结论是“这个键没生效”。
最小复现(工作区成员 lib,[test] programs = "directory"):
lib/tests/a_test.cpp int other(); int main() { return other() == 7 ? 0 : 1; }
lib/tests/b_test.cpp int other() { return 7; }
lib/tests/group/c_test.cpp int third(); int main() { return third() == 3 ? 0 : 1; }
lib/tests/group/d_test.cpp int third() { return 3; }
$ mcpp test --workspace
Compiling a_test (test)
a_test ... FAIL (compile) undefined reference to `other()'
Compiling b_test (test)
b_test ... FAIL (compile) undefined reference to `main'
Compiling group (test)
group ... ok
group 合成了一个程序,a_test/b_test 仍各是一个。建议任选其一:
文档和校验信息里写明“tests/ 的每个子目录是一个程序,根下的文件仍是一个文件一个程序”;
键打开但没有任何子目录(设置不改变任何东西)时给一条提示;
或者提供让 tests/ 根本身也算一个目录的取值。对已有的包这是最省事的迁移:不用挪文件。
2. mcpp test -p 的耗时汇总里有一段没有名字,依赖和工具链在一次调用里解析并打印两遍
对一个没有任何改动的成员再跑一次:
$ time mcpp test -p xengine.matter.lab
Resolved openkal … / Resolving toolchain / Resolved gcc@16.1.0 …
Finished dev [unoptimized + debuginfo] in 1.73s
Workspace building member 'xengine.matter.lab'
Resolved openkal … / Resolving toolchain / Resolved gcc@16.1.0 … ← 第二遍
Running bin/lab_test
test result ok. 1 passed; 0 failed; finished in 7.77s (build 1.60s + run 2.34s)
real 8.10 s
7.77 s 里有名字的只有 3.94 s。有改动的一次是 finished in 46.32s (build 9.55s + run 1.54s),35 s 没有归属。小包不受影响(mlibs.math 无改动重跑 1.42 s),差距随成员的依赖闭包变大。建议:
汇总行把各阶段都列出来(解析、规划、构建程序/插件、编译、链接、运行),这样能看出时间去了哪里;
一次调用里解析结果复用,不做第二遍。
3. 同一工作区两个 mcpp 同时跑,出现过一次 no local package index(未能复现,先记录)
第二个进程会正确地等构建目录(Waiting for the build directory, held by pid …),这一点很好。但有一次第二个进程以 no local package index 结束,当时第一个进程正在刷新索引。只出现过一次,没有复现步骤;如果索引的刷新不是“写临时文件再原子替换”,这里可能有一个窗口。
Released in mcpp 2026.11.21.1 (#984): item 2, the run records each build as one named part (builds.ndjson, MCPP_BUILD_RECORD); item 4, [profile.<name>] dependency_debug (a test program whose only dependency is mtest fell from 43.7 MB to 8.3 MB); item 5, the home's unit cache (a fresh checkout of mcpp on a filled cache builds in 4.1 s instead of 164 s). Item 1 was already in place (programs = "package", and the count of files left directly under a fixed directory is stated, SPEC-017 B1.2). Items 3 (an index read while another process refreshes it) and 6 (a hint for mcpp clean --stale) are not part of this release; the issue stays open for them.
Correction to the comment above: items 3 and 6 were released in 2026.11.13.1 (design 2026-11-12 §18, P3 and P6), not left out.
Item 6: a build whose configuration opens a new directory warns with the size of the one beside it and the command that reclaims it (mcpp clean --stale); tests/e2e/cache/directories.cpp holds it.
Item 3: a process that finds another refreshing the index waits for that refresh when an index is absent, instead of reporting no local package index. Its judgement of "absent" differed from the reader's (<index>/pkgs) and left out the provider's own index (xim), so two windows remained: a directory the other process had made and not yet filled, and a first fetch of xim. index refresh and test counts: a refresh beside another process waits while an index the home reads has no packages (mcpp#927); a suite is counted by its cases #999 makes the judgement the reader's, covers every index the home reads, and adds the unit cases that hold it (they fail against the previous code).
#999 is merged: a process that finds another refreshing the index waits whenever an index the home reads (the provider's own xim and each declared one) has no packages yet, judged as the reader judges it (<index>/pkgs), and the unit cases XlingsIndexLock/* hold the three situations. It is released with the next mcpp version (CHANGELOG [Unreleased]).
With this, every item of the report is answered: 1 was in place; 3 and 6 since 2026.11.13.1, 3 completed by #999; 2, 4 and 5 in 2026.11.21.1.
Activity
feat(M6.2 T2.13b): the matter subject on a whole world — why a grain …
docs: the test and CI design for mtest, mcpp's test system and CI (mc…
feat: a test and a build share the machine's budget of slots and a me…
feat: a build records each edge it ran with its processor time and la…
feat: the dependencies from the store and git compile with the line t…
feat: a package whose sources are named runs its build program in the…
feat: a compile whose command and read files hold an earlier compile'…
2026.11.21.1: the test and CI design (mtest 0.11), the home's unit ca…
speak-agent commentedon Nov 22, 2026
Released in mcpp 2026.11.21.1 (#984): item 2, the run records each build as one named part (
builds.ndjson,MCPP_BUILD_RECORD); item 4,[profile.<name>] dependency_debug(a test program whose only dependency is mtest fell from 43.7 MB to 8.3 MB); item 5, the home's unit cache (a fresh checkout of mcpp on a filled cache builds in 4.1 s instead of 164 s). Item 1 was already in place (programs = "package", and the count of files left directly under a fixed directory is stated, SPEC-017 B1.2). Items 3 (an index read while another process refreshes it) and 6 (a hint formcpp clean --stale) are not part of this release; the issue stays open for them.speak-agent commentedon Nov 22, 2026
Correction to the comment above: items 3 and 6 were released in 2026.11.13.1 (design 2026-11-12 §18, P3 and P6), not left out.
mcpp clean --stale);tests/e2e/cache/directories.cppholds it.<index>/pkgs) and left out the provider's own index (xim), so two windows remained: a directory the other process had made and not yet filled, and a first fetch ofxim. index refresh and test counts: a refresh beside another process waits while an index the home reads has no packages (mcpp#927); a suite is counted by its cases #999 makes the judgement the reader's, covers every index the home reads, and adds the unit cases that hold it (they fail against the previous code).This issue is closed when #999 is merged.
speak-agent commentedon Nov 22, 2026
#999 is merged: a process that finds another refreshing the index waits whenever an index the home reads (the provider's own
ximand each declared one) has no packages yet, judged as the reader judges it (<index>/pkgs), and the unit casesXlingsIndexLock/*hold the three situations. It is released with the next mcpp version (CHANGELOG[Unreleased]).With this, every item of the report is answered: 1 was in place; 3 and 6 since 2026.11.13.1, 3 completed by #999; 2, 4 and 5 in 2026.11.21.1.