build: declare package tests and run them in CI
VoidLibrary (VBS) / vbs-build (pull_request) Failing after 1m3s
VoidLibrary (VBS) / vbs-build (push) Failing after 1m8s

This commit is contained in:
Void agent committed 2026-12-05 11:39:19 +03:00
1 parent 3d80649b8c
commit 99c91ab5fc
2 files changed
+25 -2

No files matched your search

+23
View File
@@ -43,6 +43,29 @@ void build(Void::Build::Project &project) {
project.install_directory("include", "include");
project.install_file("README.md", "share/doc/VoidLibrary");
// Per-module package tests (standalone mains under tests/package/<Module>Only).
const std::vector<std::pair<std::string, std::string>> package_tests = {
{"algorithms", "Algorithms"}, {"core", "Core"},
{"crypto", "Crypto"}, {"configuration", "Configuration"},
{"archive", "Archive"}, {"binary", "Binary"},
{"containers", "Containers"}, {"data", "Data"},
{"fsm", "Fsm"}, {"io", "IO"},
{"text", "Text"}, {"unicode", "Unicode"},
{"async", "Async"}, {"log", "Log"},
{"storage", "Storage"}, {"sqlite", "Sqlite"},
};
for (const auto &[test_name, module_name] : package_tests) {
const std::string test_dir = "tests/package/" + module_name + "Only";
if (!std::filesystem::is_directory(test_dir) ||
!std::filesystem::is_regular_file(test_dir + "/main.cpp")) {
continue;
}
auto package_test = project.test("void_" + test_name + "_tests");
package_test.cxx_standard(Void::Build::CxxStandard::Cxx26)
.sources({test_dir + "/main.cpp"})
.link(libs.modules.at(module_name));
}
// Smoke test exercising the native VoidLibrary closure through VBS.
auto smoke = project.test("void_smoke");
smoke.cxx_standard(Void::Build::CxxStandard::Cxx26)