summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Hashimoto <m@mitchellh.com>2025-07-22 15:28:11 -0700
committerGitHub <noreply@github.com>2025-07-22 15:28:11 -0700
commitc979ece916fb8e9b5d250c991dfa391f60502b7f (patch)
treeedeb3bf12eb054b6afa5a8bcb737809172d04ccb
parent95ccf3abb2b816882f31aa5d1a7325e0c2896cb1 (diff)
parentd5995ac45c7ee1fa64ec4a20bec17a7da4584f9f (diff)
build-system: Replace deprecated usages of root_source_file on addTests (#8031)
Yet another low-hanging fruit
-rw-r--r--pkg/cimgui/build.zig8
-rw-r--r--pkg/fontconfig/build.zig8
-rw-r--r--pkg/freetype/build.zig8
-rw-r--r--pkg/glslang/build.zig8
-rw-r--r--pkg/harfbuzz/build.zig8
-rw-r--r--pkg/highway/build.zig8
-rw-r--r--pkg/macos/build.zig8
-rw-r--r--pkg/oniguruma/build.zig8
-rw-r--r--pkg/spirv-cross/build.zig8
-rw-r--r--pkg/wuffs/build.zig9
10 files changed, 51 insertions, 30 deletions
diff --git a/pkg/cimgui/build.zig b/pkg/cimgui/build.zig
index 60bab2c70..83d60737e 100644
--- a/pkg/cimgui/build.zig
+++ b/pkg/cimgui/build.zig
@@ -111,9 +111,11 @@ pub fn build(b: *std.Build) !void {
const test_exe = b.addTest(.{
.name = "test",
- .root_source_file = b.path("main.zig"),
- .target = target,
- .optimize = optimize,
+ .root_module = b.createModule(.{
+ .root_source_file = b.path("main.zig"),
+ .target = target,
+ .optimize = optimize,
+ }),
});
test_exe.linkLibrary(lib);
const tests_run = b.addRunArtifact(test_exe);
diff --git a/pkg/fontconfig/build.zig b/pkg/fontconfig/build.zig
index c4f99c1e9..c9ea517ed 100644
--- a/pkg/fontconfig/build.zig
+++ b/pkg/fontconfig/build.zig
@@ -29,9 +29,11 @@ pub fn build(b: *std.Build) !void {
const test_exe = b.addTest(.{
.name = "test",
- .root_source_file = b.path("main.zig"),
- .target = target,
- .optimize = optimize,
+ .root_module = b.createModule(.{
+ .root_source_file = b.path("main.zig"),
+ .target = target,
+ .optimize = optimize,
+ }),
});
const tests_run = b.addRunArtifact(test_exe);
const test_step = b.step("test", "Run tests");
diff --git a/pkg/freetype/build.zig b/pkg/freetype/build.zig
index b13ba1fa8..d000442be 100644
--- a/pkg/freetype/build.zig
+++ b/pkg/freetype/build.zig
@@ -23,9 +23,11 @@ pub fn build(b: *std.Build) !void {
if (target.query.isNative()) {
test_exe = b.addTest(.{
.name = "test",
- .root_source_file = b.path("main.zig"),
- .target = target,
- .optimize = optimize,
+ .root_module = b.createModule(.{
+ .root_source_file = b.path("main.zig"),
+ .target = target,
+ .optimize = optimize,
+ }),
});
const tests_run = b.addRunArtifact(test_exe.?);
const test_step = b.step("test", "Run tests");
diff --git a/pkg/glslang/build.zig b/pkg/glslang/build.zig
index 9a8e72815..c5e76008a 100644
--- a/pkg/glslang/build.zig
+++ b/pkg/glslang/build.zig
@@ -20,9 +20,11 @@ pub fn build(b: *std.Build) !void {
if (target.query.isNative()) {
const test_exe = b.addTest(.{
.name = "test",
- .root_source_file = b.path("main.zig"),
- .target = target,
- .optimize = optimize,
+ .root_module = b.createModule(.{
+ .root_source_file = b.path("main.zig"),
+ .target = target,
+ .optimize = optimize,
+ }),
});
test_exe.linkLibrary(lib);
const tests_run = b.addRunArtifact(test_exe);
diff --git a/pkg/harfbuzz/build.zig b/pkg/harfbuzz/build.zig
index 861f2802d..bf247461a 100644
--- a/pkg/harfbuzz/build.zig
+++ b/pkg/harfbuzz/build.zig
@@ -43,9 +43,11 @@ pub fn build(b: *std.Build) !void {
const test_exe = b.addTest(.{
.name = "test",
- .root_source_file = b.path("main.zig"),
- .target = target,
- .optimize = optimize,
+ .root_module = b.createModule(.{
+ .root_source_file = b.path("main.zig"),
+ .target = target,
+ .optimize = optimize,
+ }),
});
{
diff --git a/pkg/highway/build.zig b/pkg/highway/build.zig
index 29919615c..c8ef2d18e 100644
--- a/pkg/highway/build.zig
+++ b/pkg/highway/build.zig
@@ -98,9 +98,11 @@ pub fn build(b: *std.Build) !void {
{
const test_exe = b.addTest(.{
.name = "test",
- .root_source_file = b.path("main.zig"),
- .target = target,
- .optimize = optimize,
+ .root_module = b.createModule(.{
+ .root_source_file = b.path("main.zig"),
+ .target = target,
+ .optimize = optimize,
+ }),
});
test_exe.linkLibrary(lib);
diff --git a/pkg/macos/build.zig b/pkg/macos/build.zig
index 4188ab9e5..0525e481e 100644
--- a/pkg/macos/build.zig
+++ b/pkg/macos/build.zig
@@ -54,9 +54,11 @@ pub fn build(b: *std.Build) !void {
{
const test_exe = b.addTest(.{
.name = "test",
- .root_source_file = b.path("main.zig"),
- .target = target,
- .optimize = optimize,
+ .root_module = b.createModule(.{
+ .root_source_file = b.path("main.zig"),
+ .target = target,
+ .optimize = optimize,
+ }),
});
if (target.result.os.tag.isDarwin()) {
try apple_sdk.addPaths(b, test_exe);
diff --git a/pkg/oniguruma/build.zig b/pkg/oniguruma/build.zig
index d9287b4fa..77e3b6f65 100644
--- a/pkg/oniguruma/build.zig
+++ b/pkg/oniguruma/build.zig
@@ -23,9 +23,11 @@ pub fn build(b: *std.Build) !void {
if (target.query.isNative()) {
test_exe = b.addTest(.{
.name = "test",
- .root_source_file = b.path("main.zig"),
- .target = target,
- .optimize = optimize,
+ .root_module = b.createModule(.{
+ .root_source_file = b.path("main.zig"),
+ .target = target,
+ .optimize = optimize,
+ }),
});
const tests_run = b.addRunArtifact(test_exe.?);
const test_step = b.step("test", "Run tests");
diff --git a/pkg/spirv-cross/build.zig b/pkg/spirv-cross/build.zig
index 8ac612f08..b359ccd9c 100644
--- a/pkg/spirv-cross/build.zig
+++ b/pkg/spirv-cross/build.zig
@@ -15,9 +15,11 @@ pub fn build(b: *std.Build) !void {
if (target.query.isNative()) {
const test_exe = b.addTest(.{
.name = "test",
- .root_source_file = b.path("main.zig"),
- .target = target,
- .optimize = optimize,
+ .root_module = b.createModule(.{
+ .root_source_file = b.path("main.zig"),
+ .target = target,
+ .optimize = optimize,
+ }),
});
test_exe.linkLibrary(lib);
const tests_run = b.addRunArtifact(test_exe);
diff --git a/pkg/wuffs/build.zig b/pkg/wuffs/build.zig
index 4d144e76a..b151892ed 100644
--- a/pkg/wuffs/build.zig
+++ b/pkg/wuffs/build.zig
@@ -12,9 +12,12 @@ pub fn build(b: *std.Build) !void {
});
const unit_tests = b.addTest(.{
- .root_source_file = b.path("src/main.zig"),
- .target = target,
- .optimize = optimize,
+ .name = "test",
+ .root_module = b.createModule(.{
+ .root_source_file = b.path("src/main.zig"),
+ .target = target,
+ .optimize = optimize,
+ }),
});
unit_tests.linkLibC();