//! The volume-manager service as a binary package (docs/build-packages-plan.md): //! this file names the binary and EXACTLY the modules its source imports — //! build-support resolves each name from the domains this zon declares. const std = @import("std"); const build_support = @import("build-support"); pub fn build(b: *std.Build) void { const exe = build_support.userBinary(b, .{ .name = "volume-manager", .root_source_file = b.path("volume-manager.zig"), .imports = &.{ "block", "channel", "device-manager-protocol", "driver", "envelope", "ipc", "logging", "memory", "process", "service", "time", "volume-manager-protocol", }, }); b.installArtifact(exe); // Standalone `zig build test` for the parser + mount-map modules; the root // build keeps its aggregate test step. const csv = b.dependency("csv", .{}); const test_step = b.step("test", "Run the partition parser + mount-map unit tests"); const partition_tests = b.addTest(.{ .root_module = b.createModule(.{ .root_source_file = b.path("partition.zig"), .target = b.resolveTargetQuery(.{}), }), }); test_step.dependOn(&b.addRunArtifact(partition_tests).step); // filesystem-map imports csv (and, by path, partition.zig), so its test // module needs csv wired. const filesystem_map_tests = b.addTest(.{ .root_module = b.createModule(.{ .root_source_file = b.path("filesystem-map.zig"), .target = b.resolveTargetQuery(.{}), .imports = &.{.{ .name = "csv", .module = csv.module("csv") }}, }), }); test_step.dependOn(&b.addRunArtifact(filesystem_map_tests).step); }