From 3ec337484b80647ee23217533c1d62e914afa4f1 Mon Sep 17 00:00:00 2001 From: kcbanner Date: Thu, 13 Jul 2023 12:58:42 -0400 Subject: [PATCH] linker tests: add missing dependOn calls for CheckObject steps --- test/link/macho/dead_strip/build.zig | 2 ++ test/link/macho/dylib/build.zig | 1 + test/link/macho/entry/build.zig | 1 + test/link/macho/entry_in_dylib/build.zig | 1 + test/link/macho/needed_library/build.zig | 1 + test/link/macho/search_strategy/build.zig | 1 + test/link/macho/stack_size/build.zig | 1 + test/link/macho/strict_validation/build.zig | 1 + test/link/macho/unwind_info/build.zig | 1 + test/link/macho/weak_library/build.zig | 1 + 10 files changed, 11 insertions(+) diff --git a/test/link/macho/dead_strip/build.zig b/test/link/macho/dead_strip/build.zig index 5ca3e5f89f19..4489fdf3ad89 100644 --- a/test/link/macho/dead_strip/build.zig +++ b/test/link/macho/dead_strip/build.zig @@ -16,6 +16,7 @@ pub fn build(b: *std.Build) void { const check = exe.checkObject(); check.checkInSymtab(); check.checkNext("{*} (__TEXT,__text) external _iAmUnused"); + test_step.dependOn(&check.step); const run = b.addRunArtifact(exe); run.skip_foreign_checks = true; @@ -31,6 +32,7 @@ pub fn build(b: *std.Build) void { const check = exe.checkObject(); check.checkInSymtab(); check.checkNotPresent("{*} (__TEXT,__text) external _iAmUnused"); + test_step.dependOn(&check.step); const run = b.addRunArtifact(exe); run.skip_foreign_checks = true; diff --git a/test/link/macho/dylib/build.zig b/test/link/macho/dylib/build.zig index 5fbf73dd1b89..499a0089e1b5 100644 --- a/test/link/macho/dylib/build.zig +++ b/test/link/macho/dylib/build.zig @@ -53,6 +53,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize check_exe.checkStart("cmd RPATH"); check_exe.checkNextFileSource("path", dylib.getOutputDirectorySource()); + test_step.dependOn(&check_exe.step); const run = b.addRunArtifact(exe); run.skip_foreign_checks = true; diff --git a/test/link/macho/entry/build.zig b/test/link/macho/entry/build.zig index 454956ad4134..1e0c146e114e 100644 --- a/test/link/macho/entry/build.zig +++ b/test/link/macho/entry/build.zig @@ -34,6 +34,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize check_exe.checkNext("{n_value} (__TEXT,__text) external _non_main"); check_exe.checkComputeCompare("vmaddr entryoff +", .{ .op = .eq, .value = .{ .variable = "n_value" } }); + test_step.dependOn(&check_exe.step); const run = b.addRunArtifact(exe); run.skip_foreign_checks = true; diff --git a/test/link/macho/entry_in_dylib/build.zig b/test/link/macho/entry_in_dylib/build.zig index acb26efcebe6..cf1d028706fd 100644 --- a/test/link/macho/entry_in_dylib/build.zig +++ b/test/link/macho/entry_in_dylib/build.zig @@ -47,6 +47,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize .op = .eq, .value = .{ .variable = "stubs_vmaddr" }, // The entrypoint should be a synthetic stub }); + test_step.dependOn(&check_exe.step); const run = b.addRunArtifact(exe); run.skip_foreign_checks = true; diff --git a/test/link/macho/needed_library/build.zig b/test/link/macho/needed_library/build.zig index d39166c18b5b..4b7dbfd1e054 100644 --- a/test/link/macho/needed_library/build.zig +++ b/test/link/macho/needed_library/build.zig @@ -41,6 +41,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize const check = exe.checkObject(); check.checkStart("cmd LOAD_DYLIB"); check.checkNext("name @rpath/liba.dylib"); + test_step.dependOn(&check.step); const run = b.addRunArtifact(exe); run.skip_foreign_checks = true; diff --git a/test/link/macho/search_strategy/build.zig b/test/link/macho/search_strategy/build.zig index 336ca593b14f..b30540b81813 100644 --- a/test/link/macho/search_strategy/build.zig +++ b/test/link/macho/search_strategy/build.zig @@ -23,6 +23,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize const check = exe.checkObject(); check.checkStart("cmd LOAD_DYLIB"); check.checkNext("name @rpath/libsearch_dylibs_first.dylib"); + test_step.dependOn(&check.step); const run = b.addRunArtifact(exe); run.skip_foreign_checks = true; diff --git a/test/link/macho/stack_size/build.zig b/test/link/macho/stack_size/build.zig index 219d65cdb84b..81ca05254531 100644 --- a/test/link/macho/stack_size/build.zig +++ b/test/link/macho/stack_size/build.zig @@ -27,6 +27,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize const check_exe = exe.checkObject(); check_exe.checkStart("cmd MAIN"); check_exe.checkNext("stacksize 100000000"); + test_step.dependOn(&check_exe.step); const run = b.addRunArtifact(exe); run.skip_foreign_checks = true; diff --git a/test/link/macho/strict_validation/build.zig b/test/link/macho/strict_validation/build.zig index d75b4c582019..fd62a4712e3c 100644 --- a/test/link/macho/strict_validation/build.zig +++ b/test/link/macho/strict_validation/build.zig @@ -121,6 +121,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize }, else => unreachable, } + test_step.dependOn(&check_exe.step); const run = b.addRunArtifact(exe); run.skip_foreign_checks = true; diff --git a/test/link/macho/unwind_info/build.zig b/test/link/macho/unwind_info/build.zig index 6f19acef3897..bc0373e69371 100644 --- a/test/link/macho/unwind_info/build.zig +++ b/test/link/macho/unwind_info/build.zig @@ -46,6 +46,7 @@ fn testUnwindInfo( check.checkInSymtab(); check.checkNext("{*} (__TEXT,__text) external ___gxx_personality_v0"); + test_step.dependOn(&check.step); const run = b.addRunArtifact(exe); run.skip_foreign_checks = true; diff --git a/test/link/macho/weak_library/build.zig b/test/link/macho/weak_library/build.zig index 81a694be9b4c..79b7c748b88b 100644 --- a/test/link/macho/weak_library/build.zig +++ b/test/link/macho/weak_library/build.zig @@ -45,6 +45,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize check.checkInSymtab(); check.checkNext("(undefined) weak external _asStr (from liba)"); + test_step.dependOn(&check.step); const run = b.addRunArtifact(exe); run.skip_foreign_checks = true;