add functional and nestest conformance test suite

This commit is contained in:
2026-08-10 18:35:40 +02:00
parent c7242c3f94
commit a79e9c7862
7 changed files with 1010 additions and 10 deletions
+32 -10
View File
@@ -4,19 +4,41 @@ pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const exe = b.addExecutable(.{
.name = "6soz",
.root_source_file = b.path("src/main.zig"),
const cpu_mod = b.createModule(.{
.target = target,
.optimize = optimize,
.root_source_file = b.path("src/cpu/root.zig"),
});
b.installArtifact(exe);
const test_step = b.step("test", "Run unit tests");
const exe_tests = b.addTest(.{
.root_module = exe.root_module,
const system_mod = b.createModule(.{
.target = target,
.optimize = optimize,
.root_source_file = b.path("src/system/root.zig"),
});
const run_exe_tests = b.addRunArtifact(exe_tests);
test_step.dependOn(&run_exe_tests.step);
const platform_mod = b.createModule(.{
.target = target,
.optimize = optimize,
.root_source_file = b.path("src/platform/root.zig"),
});
const frontend_mod = b.createModule(.{
.target = target,
.optimize = optimize,
.root_source_file = b.path("src/frontend/root.zig"),
});
const exe_mod = b.createModule(.{
.target = target,
.optimize = optimize,
.root_source_file = b.path("src/main.zig"),
});
const test_step = b.step("test", "Run 6soz tests");
inline for (&.{ cpu_mod, system_mod, platform_mod, frontend_mod, exe_mod }) |mod| {
const mod_test = b.addTest(.{ .root_module = mod });
const mod_cmd = b.addRunArtifact(mod_test);
test_step.dependOn(&mod_cmd.step);
}
}