| ... | @@ -39,11 +39,11 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -39,11 +39,11 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 39 | ); | 39 | ); |
| 40 | | 40 | |
| 41 | const exe = b.addExecutable(.{ | 41 | const exe = b.addExecutable(.{ |
| 42 | .name = "main", | 42 | .name = "test", |
| 43 | .root_source_file = .{ .path = "main.c" }, | | |
| 44 | .optimize = optimize, | 43 | .optimize = optimize, |
| 45 | .target = target, | 44 | .target = target, |
| 46 | }); | 45 | }); |
| | 46 | exe.addCSourceFile("main.c", &[0][]const u8{}); |
| 47 | exe.linkSystemLibrary("a"); | 47 | exe.linkSystemLibrary("a"); |
| 48 | exe.addLibraryPathDirectorySource(tbd_file.getDirectorySource()); | 48 | exe.addLibraryPathDirectorySource(tbd_file.getDirectorySource()); |
| 49 | exe.addRPathDirectorySource(lib.getOutputDirectorySource()); | 49 | exe.addRPathDirectorySource(lib.getOutputDirectorySource()); |
| ... | @@ -51,6 +51,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -51,6 +51,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 51 | | 51 | |
| 52 | const run = b.addRunArtifact(exe); | 52 | const run = b.addRunArtifact(exe); |
| 53 | run.skip_foreign_checks = true; | 53 | run.skip_foreign_checks = true; |
| | 54 | run.expectExitCode(0); |
| 54 | | 55 | |
| 55 | test_step.dependOn(&run.step); | 56 | test_step.dependOn(&run.step); |
| 56 | } | 57 | } |