Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/openkal-compat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ env:
# run if this drifts from pins.toml. See the comment beside `mcpp` in
# pins.toml for why this pin, not just validate.yml's, is gated by the
# index floor.
MCPP_VERSION: "2026.11.7.1"
MCPP_VERSION: "2026.11.7.2"
# CROSS-VALIDATION BEFORE A RELEASE, NOT AFTER IT.
#
# Empty in an ordinary run, so this measurement keeps using the RELEASED
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,10 @@ env:
# 2026.11.2.1 (mcpp-community/mcpp#882): a dependency's patches and a
# dependency embedded in its consumer -- the floor openkal-musl 0.26.0
# states, since it embeds compat.mimalloc.
MCPP_VERSION: "2026.11.7.1"
#
# 2026.11.7.2: the built-in platform as one release, and the floor
# mcpplibs.mtest 0.1.0 states.
MCPP_VERSION: "2026.11.7.2"

jobs:
lint:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/xpkgindex-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ concurrency:

env:
PYTHONUTF8: '1'
MCPP_VERSION: '2026.11.7.1'
MCPP_VERSION: '2026.11.7.2'
# CROSS-VALIDATION BEFORE A RELEASE: a candidate that needs an mcpp newer
# than the pin (its package states the floor) is built with mcpp built from
# this branch of mcpp-community/mcpp, as openkal-compat.yml measures with it.
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@

### Added

- **mtest 0.1.0.** `mcpplibs.mtest`, the C++ library of the mtest test system (cases, expectations, fixtures, bench,
conformance and end-to-end helpers, no macro and no header, speaking the mtest test protocol); its GoogleTest
adapter `mcpplibs.mtest.gtest`; its C ABI `mcpplibs.mtest.capi`. The three share one tag and one archive of
mcpp-community/mtest, each descriptor naming its member's manifest. The test members `mtest`, `mtest-gtest` and
`mtest-capi` consume them.
- **mcpplibs.os 0.4.0.** `is_openkal` names a build for the openkal target, as each `is_<platform>` names its own
(`is_image` remains as a deprecated alias); `can_run_on(p)` and `on<P>(f)` ask one platform question of a native
build and an image alike; the platform modules are defined in an image where it can answer them; the effective user
Expand Down
3 changes: 3 additions & 0 deletions mcpp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ members = [
"tests/examples/marzer.tomlplusplus-build-mcpp",
"tests/examples/mcpp-plugins",
"tests/examples/mio",
"tests/examples/mtest",
"tests/examples/mtest-capi",
"tests/examples/mtest-gtest",
"tests/examples/muduo",
"tests/examples/libmysqlclient",
"tests/examples/mysql-connector-cpp",
Expand Down
53 changes: 53 additions & 0 deletions pkgs/m/mcpplibs.mtest.capi.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
-- mcpplibs.mtest.capi --- the C ABI of the mtest test protocol.
--
-- A package of mcpp-community/mtest (one tag, one archive): include/mtest.h and
-- a shared library through which a program of any language with a C FFI
-- reports by the protocol.
package = {
spec = "1",
namespace = "mcpplibs.mtest",
name = "capi",
description = "mtest's C ABI: the test protocol's events for any language with a C FFI",
licenses = {"Apache-2.0"},
repo = "https://github.com/mcpp-community/mtest",
type = "package",

extensions = {
autoupdate = {
tag = "v${version}",
url = "https://github.com/mcpp-community/mtest/archive/refs/tags/${tag}.tar.gz",
},
},

xpm = {
linux = {
["0.1.0"] = {
url = {
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.1.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.1.0/mtest-v0.1.0.tar.gz",
},
sha256 = "2e09528d97173371e0238c720cb8ac80602241f4e05d55d3acb12f21b5c95c75",
},
},
macosx = {
["0.1.0"] = {
url = {
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.1.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.1.0/mtest-v0.1.0.tar.gz",
},
sha256 = "2e09528d97173371e0238c720cb8ac80602241f4e05d55d3acb12f21b5c95c75",
},
},
windows = {
["0.1.0"] = {
url = {
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.1.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.1.0/mtest-v0.1.0.tar.gz",
},
sha256 = "2e09528d97173371e0238c720cb8ac80602241f4e05d55d3acb12f21b5c95c75",
},
},
},

mcpp = "*/capi/mcpp.toml",
}
52 changes: 52 additions & 0 deletions pkgs/m/mcpplibs.mtest.gtest.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
-- mcpplibs.mtest.gtest --- GoogleTest speaking the mtest test protocol.
--
-- A package of mcpp-community/mtest (one tag, one archive): a test main that
-- lists, selects and reports GoogleTest's cases by the protocol, level 1.
package = {
spec = "1",
namespace = "mcpplibs.mtest",
name = "gtest",
description = "GoogleTest speaking the mtest test protocol: a test main that lists, selects and reports GoogleTest's cases",
licenses = {"Apache-2.0"},
repo = "https://github.com/mcpp-community/mtest",
type = "package",

extensions = {
autoupdate = {
tag = "v${version}",
url = "https://github.com/mcpp-community/mtest/archive/refs/tags/${tag}.tar.gz",
},
},

xpm = {
linux = {
["0.1.0"] = {
url = {
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.1.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.1.0/mtest-v0.1.0.tar.gz",
},
sha256 = "2e09528d97173371e0238c720cb8ac80602241f4e05d55d3acb12f21b5c95c75",
},
},
macosx = {
["0.1.0"] = {
url = {
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.1.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.1.0/mtest-v0.1.0.tar.gz",
},
sha256 = "2e09528d97173371e0238c720cb8ac80602241f4e05d55d3acb12f21b5c95c75",
},
},
windows = {
["0.1.0"] = {
url = {
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.1.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.1.0/mtest-v0.1.0.tar.gz",
},
sha256 = "2e09528d97173371e0238c720cb8ac80602241f4e05d55d3acb12f21b5c95c75",
},
},
},

mcpp = "*/adapters/gtest/mcpp.toml",
}
55 changes: 55 additions & 0 deletions pkgs/m/mtest.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
-- mtest --- mcpplibs.mtest, the C++ library of the mtest test system.
--
-- One of the packages of mcpp-community/mtest, which share one tag and one
-- archive; each descriptor names its member's manifest. Cases, expectations,
-- fixtures and attributes with no macro and no header; a program built with it
-- speaks the mtest test protocol (spec/protocol.md), and its entry begins a
-- test file that defines no `main` (mcpp 2026.11.8.1 and later).
package = {
spec = "1",
namespace = "mcpplibs",
name = "mtest",
description = "mcpplibs.mtest: the C++ test library of mtest --- cases, expectations, fixtures, bench, conformance and end-to-end helpers, with no macro and no header, speaking the mtest test protocol",
licenses = {"Apache-2.0"},
repo = "https://github.com/mcpp-community/mtest",
type = "package",

extensions = {
autoupdate = {
tag = "v${version}",
url = "https://github.com/mcpp-community/mtest/archive/refs/tags/${tag}.tar.gz",
},
},

xpm = {
linux = {
["0.1.0"] = {
url = {
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.1.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.1.0/mtest-v0.1.0.tar.gz",
},
sha256 = "2e09528d97173371e0238c720cb8ac80602241f4e05d55d3acb12f21b5c95c75",
},
},
macosx = {
["0.1.0"] = {
url = {
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.1.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.1.0/mtest-v0.1.0.tar.gz",
},
sha256 = "2e09528d97173371e0238c720cb8ac80602241f4e05d55d3acb12f21b5c95c75",
},
},
windows = {
["0.1.0"] = {
url = {
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.1.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.1.0/mtest-v0.1.0.tar.gz",
},
sha256 = "2e09528d97173371e0238c720cb8ac80602241f4e05d55d3acb12f21b5c95c75",
},
},
},

mcpp = "*/lib/mcpp.toml",
}
11 changes: 11 additions & 0 deletions tests/examples/mtest-capi/mcpp.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# mcpplibs.mtest.capi test project: a program reports a case through the C ABI (include/mtest.h and
# its shared library), as a program of any language with a C FFI does.
[package]
name = "mtest-capi-tests"
version = "0.1.0"

[indices]
# Use the complete candidate built-in index prepared by tests/run_members.sh.

[dependencies]
mcpplibs.mtest.capi = "0.1.0"
7 changes: 7 additions & 0 deletions tests/examples/mtest-capi/tests/report.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include <mtest.h>
int main() {
mtest_init("c", 1);
if (mtest_listing()) { mtest_case("adds", __FILE__, __LINE__, "unit"); return mtest_done(); }
if (mtest_selected("adds")) { mtest_begin("adds"); mtest_end("adds", 1 + 1 == 2 ? "pass" : "fail", 0); }
return mtest_done();
}
16 changes: 16 additions & 0 deletions tests/examples/mtest-gtest/mcpp.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# mcpplibs.mtest.gtest test project: GoogleTest's cases begun by the adapter's main, which reports
# them by the mtest protocol. compat.gtest is named too, so an mcpp before 2026.11.8.1 leaves its
# gtest_main.cc out of a test that begins at the adapter.
[package]
name = "mtest-gtest-tests"
version = "0.1.0"

[indices]
# Use the complete candidate built-in index prepared by tests/run_members.sh.

[dev-dependencies]
compat.gtest = "1.18.0"
mcpplibs.mtest.gtest = "0.1.0"

[test]
main = { from = "mcpplibs.mtest.gtest/main" }
3 changes: 3 additions & 0 deletions tests/examples/mtest-gtest/tests/suite.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#include <gtest/gtest.h>
TEST(Arithmetic, Adds) { EXPECT_EQ(1 + 1, 2); }
TEST(Arithmetic, Multiplies) { EXPECT_EQ(2 * 3, 6); }
11 changes: 11 additions & 0 deletions tests/examples/mtest/mcpp.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# mcpplibs.mtest test project: cases, expectations, an expected failure and parameters through the
# published index, reported by the library's own `report()`.
[package]
name = "mtest-tests"
version = "0.1.0"

[indices]
# Use the complete candidate built-in index prepared by tests/run_members.sh.

[dev-dependencies]
mcpplibs.mtest = "0.1.0"
9 changes: 9 additions & 0 deletions tests/examples/mtest/tests/cases.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import std;
import mcpplibs.mtest;
using namespace mcpplibs::mtest;
int main() {
"a comparison holds"_test = [] { expect(eq(1 + 1, 2)); };
"a failure reports both sides"_test[expect_failure{"shown"}] = [] { expect(eq(std::string("a"), std::string("b"))); };
"parameters"_test = values{2, 4, 6} | [](int v) { expect(eq(v % 2, 0)); };
return report();
}
4 changes: 3 additions & 1 deletion tests/openkal/pins.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ toolchain = "llvm@22.1.8"
# index requires mcpp >= 2026.9.18.1 but this is mcpp 2026.9.17.3 [E0006]"
# before a single line of the member's own source is read.
#
# 2026-11-08: measurement engine 2026.11.7.2 (the built-in platform is one
# release) matches all CI workflows.
# 2026-11-07: measurement engine 2026.11.7.1 (version groups take part in
# resolution; the built-in platform is a series) matches all CI workflows.
# 2026-11-03: measurement engine 2026.11.3.1 matches all CI workflows; the
Expand Down Expand Up @@ -149,7 +151,7 @@ toolchain = "llvm@22.1.8"
# openkal-musl 0.16.0 and openkal-llvm-runtime 0.12.0), because a pin that
# moves onto an unreachable or divergent asset fails every member at once and
# reports it as a compatibility result.
mcpp = "2026.11.7.1"
mcpp = "2026.11.7.2"

# The Windows target is named for the C environment the graph presents there,
# which is musl's (openkal-musl declares `[c-abi] presents = "posix"`), not
Expand Down
Loading