diff options
| author | Matthew Lugg <mlugg@mlugg.co.uk> | 2024-10-06 11:16:27 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-06 11:16:27 +0100 |
| commit | 008bb1f1201a4b4987bf00de9daf46185aa9292d (patch) | |
| tree | fa5017a9988957b1a71838ea9fe7d388f6619541 /test | |
| parent | 516cb5a5e86bb9d30c16d0692e3b9eb706812b42 (diff) | |
| parent | 90db7677212f8331733a661615490d37c7bf75d2 (diff) | |
| download | zig-008bb1f1201a4b4987bf00de9daf46185aa9292d.tar.gz zig-008bb1f1201a4b4987bf00de9daf46185aa9292d.zip | |
Merge pull request #21518 from mlugg/incremental-ci
incr-check enhancements, and CI for incremental test cases
Diffstat (limited to 'test')
| -rw-r--r-- | test/incremental/add_decl | 1 | ||||
| -rw-r--r-- | test/incremental/add_decl_namespaced | 1 | ||||
| -rw-r--r-- | test/incremental/delete_comptime_decls | 1 | ||||
| -rw-r--r-- | test/incremental/hello | 1 | ||||
| -rw-r--r-- | test/incremental/modify_inline_fn | 1 | ||||
| -rw-r--r-- | test/incremental/move_src | 1 | ||||
| -rw-r--r-- | test/incremental/remove_enum_field | 1 | ||||
| -rw-r--r-- | test/incremental/type_becomes_comptime_only | 1 | ||||
| -rw-r--r-- | test/incremental/unreferenced_error | 1 | ||||
| -rw-r--r-- | test/tests.zig | 28 |
10 files changed, 37 insertions, 0 deletions
diff --git a/test/incremental/add_decl b/test/incremental/add_decl index 1f9788f481..6b3a0dad84 100644 --- a/test/incremental/add_decl +++ b/test/incremental/add_decl @@ -1,5 +1,6 @@ #target=x86_64-linux-selfhosted #target=x86_64-linux-cbe +#target=x86_64-windows-cbe #update=initial version #file=main.zig const std = @import("std"); diff --git a/test/incremental/add_decl_namespaced b/test/incremental/add_decl_namespaced index 7063e3fa74..48ed5cfd2e 100644 --- a/test/incremental/add_decl_namespaced +++ b/test/incremental/add_decl_namespaced @@ -1,5 +1,6 @@ #target=x86_64-linux-selfhosted #target=x86_64-linux-cbe +#target=x86_64-windows-cbe #update=initial version #file=main.zig const std = @import("std"); diff --git a/test/incremental/delete_comptime_decls b/test/incremental/delete_comptime_decls index 54411797cf..03ddc68128 100644 --- a/test/incremental/delete_comptime_decls +++ b/test/incremental/delete_comptime_decls @@ -1,5 +1,6 @@ #target=x86_64-linux-selfhosted #target=x86_64-linux-cbe +#target=x86_64-windows-cbe #update=initial version #file=main.zig pub fn main() void {} diff --git a/test/incremental/hello b/test/incremental/hello index 9419b3d186..3526b47f7c 100644 --- a/test/incremental/hello +++ b/test/incremental/hello @@ -1,5 +1,6 @@ #target=x86_64-linux-selfhosted #target=x86_64-linux-cbe +#target=x86_64-windows-cbe #update=initial version #file=main.zig const std = @import("std"); diff --git a/test/incremental/modify_inline_fn b/test/incremental/modify_inline_fn index 69ab1f429a..cd5361fb17 100644 --- a/test/incremental/modify_inline_fn +++ b/test/incremental/modify_inline_fn @@ -1,5 +1,6 @@ #target=x86_64-linux-selfhosted #target=x86_64-linux-cbe +#target=x86_64-windows-cbe #update=initial version #file=main.zig const std = @import("std"); diff --git a/test/incremental/move_src b/test/incremental/move_src index 8a3a24a269..908135485c 100644 --- a/test/incremental/move_src +++ b/test/incremental/move_src @@ -1,5 +1,6 @@ #target=x86_64-linux-selfhosted #target=x86_64-linux-cbe +#target=x86_64-windows-cbe #update=initial version #file=main.zig const std = @import("std"); diff --git a/test/incremental/remove_enum_field b/test/incremental/remove_enum_field index c163e5e168..3a882ae0f1 100644 --- a/test/incremental/remove_enum_field +++ b/test/incremental/remove_enum_field @@ -1,5 +1,6 @@ #target=x86_64-linux-selfhosted #target=x86_64-linux-cbe +#target=x86_64-windows-cbe #update=initial version #file=main.zig const MyEnum = enum(u8) { diff --git a/test/incremental/type_becomes_comptime_only b/test/incremental/type_becomes_comptime_only index 3878e0c61b..2da31ec5f2 100644 --- a/test/incremental/type_becomes_comptime_only +++ b/test/incremental/type_becomes_comptime_only @@ -1,5 +1,6 @@ #target=x86_64-linux-selfhosted #target=x86_64-linux-cbe +#target=x86_64-windows-cbe #update=initial version #file=main.zig const SomeType = u32; diff --git a/test/incremental/unreferenced_error b/test/incremental/unreferenced_error index 2031975986..3dfe0ab758 100644 --- a/test/incremental/unreferenced_error +++ b/test/incremental/unreferenced_error @@ -1,5 +1,6 @@ #target=x86_64-linux-selfhosted #target=x86_64-linux-cbe +#target=x86_64-windows-cbe #update=initial version #file=main.zig const std = @import("std"); diff --git a/test/tests.zig b/test/tests.zig index 1e98a48489..017f9478a9 100644 --- a/test/tests.zig +++ b/test/tests.zig @@ -1509,3 +1509,31 @@ pub fn addDebuggerTests(b: *std.Build, options: DebuggerContext.Options) ?*Step }); return step; } + +pub fn addIncrementalTests(b: *std.Build, test_step: *Step) !void { + const incr_check = b.addExecutable(.{ + .name = "incr-check", + .root_source_file = b.path("tools/incr-check.zig"), + .target = b.graph.host, + .optimize = .Debug, + }); + + var dir = try b.build_root.handle.openDir("test/incremental", .{ .iterate = true }); + defer dir.close(); + + var it = try dir.walk(b.graph.arena); + while (try it.next()) |entry| { + if (entry.kind != .file) continue; + + const run = b.addRunArtifact(incr_check); + run.setName(b.fmt("incr-check '{s}'", .{entry.basename})); + + run.addArg(b.graph.zig_exe); + run.addFileArg(b.path("test/incremental/").path(b, entry.path)); + run.addArgs(&.{ "--zig-lib-dir", b.fmt("{}", .{b.graph.zig_lib_directory}) }); + + run.addCheck(.{ .expect_term = .{ .Exited = 0 } }); + + test_step.dependOn(&run.step); + } +} |
