Compare commits

...

2 Commits

Author SHA1 Message Date
Andrew Kelley
3f2cf1c002 CI: skip test-incremental on Windows
Tracked by #22510
2025-11-22 08:09:25 -08:00
Andrew Kelley
c9a788c851 Revert "disable flaky test/incremental/add_decl"
This reverts commit d54fbc01234688b37a48b29fee499529a500ccf5.

Since all incremental tests are flaky on Windows, this is reinstated and
all test-incremental tests will be skipped on Windows until the
flakiness is resolved.

Closes #26003
2025-11-22 08:09:12 -08:00
4 changed files with 67 additions and 1 deletions

View File

@ -97,6 +97,7 @@ pub fn build(b: *std.Build) !void {
const skip_darwin = b.option(bool, "skip-darwin", "Main test suite skips targets with darwin OSs") orelse false;
const skip_linux = b.option(bool, "skip-linux", "Main test suite skips targets with linux OS") orelse false;
const skip_llvm = b.option(bool, "skip-llvm", "Main test suite skips targets that use LLVM backend") orelse false;
const skip_test_incremental = b.option(bool, "skip-test-incremental", "Main test step omits dependency on test-incremental step") orelse false;
const only_install_lib_files = b.option(bool, "lib-files-only", "Only install library files") orelse false;
@ -609,7 +610,7 @@ pub fn build(b: *std.Build) !void {
const test_incremental_step = b.step("test-incremental", "Run the incremental compilation test cases");
try tests.addIncrementalTests(b, test_incremental_step);
test_step.dependOn(test_incremental_step);
if (!skip_test_incremental) test_step.dependOn(test_incremental_step);
if (tests.addLibcTests(b, .{
.optimize_modes = optimization_modes,

View File

@ -59,6 +59,7 @@ Write-Output "Main test suite..."
-Dstatic-llvm `
-Dskip-non-native `
-Dskip-release `
-Dskip-test-incremental `
-Denable-symlinks-windows `
--test-timeout 30m
CheckLastExitCode

View File

@ -58,6 +58,7 @@ Write-Output "Main test suite..."
--search-prefix "$PREFIX_PATH" `
-Dstatic-llvm `
-Dskip-non-native `
-Dskip-test-incremental `
-Denable-symlinks-windows `
--test-timeout 30m
CheckLastExitCode

63
test/incremental/add_decl Normal file
View File

@ -0,0 +1,63 @@
#target=x86_64-linux-selfhosted
#target=x86_64-windows-selfhosted
#target=x86_64-linux-cbe
#target=x86_64-windows-cbe
//#target=wasm32-wasi-selfhosted
#update=initial version
#file=main.zig
const std = @import("std");
pub fn main() !void {
try std.fs.File.stdout().writeAll(foo);
}
const foo = "good morning\n";
#expect_stdout="good morning\n"
#update=add new declaration
#file=main.zig
const std = @import("std");
pub fn main() !void {
try std.fs.File.stdout().writeAll(foo);
}
const foo = "good morning\n";
const bar = "good evening\n";
#expect_stdout="good morning\n"
#update=reference new declaration
#file=main.zig
const std = @import("std");
pub fn main() !void {
try std.fs.File.stdout().writeAll(bar);
}
const foo = "good morning\n";
const bar = "good evening\n";
#expect_stdout="good evening\n"
#update=reference missing declaration
#file=main.zig
const std = @import("std");
pub fn main() !void {
try std.fs.File.stdout().writeAll(qux);
}
const foo = "good morning\n";
const bar = "good evening\n";
#expect_error=main.zig:3:39: error: use of undeclared identifier 'qux'
#update=add missing declaration
#file=main.zig
const std = @import("std");
pub fn main() !void {
try std.fs.File.stdout().writeAll(qux);
}
const foo = "good morning\n";
const bar = "good evening\n";
const qux = "good night\n";
#expect_stdout="good night\n"
#update=remove unused declarations
#file=main.zig
const std = @import("std");
pub fn main() !void {
try std.fs.File.stdout().writeAll(qux);
}
const qux = "good night\n";
#expect_stdout="good night\n"