summaryrefslogtreecommitdiff
path: root/test/tty.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test/tty.zig')
-rw-r--r--test/tty.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/tty.zig b/test/tty.zig
index 2fdf5952..d41159a0 100644
--- a/test/tty.zig
+++ b/test/tty.zig
@@ -162,7 +162,7 @@ pub const Tty = struct {
}
/// Each tape the case's sessions wrote, replayed by `exe`.
- fn replayTapes(t: *Tty, exe: []const u8, headless: bool) !void {
+ fn replayTapes(t: *Tty, exe: []const u8, other_build: bool) !void {
const tapes_dir = try std.fmt.allocPrint(t.arena, "{s}/tapes", .{t.base});
const io = std.Io.Threaded.global_single_threaded.io();
var d = try std.Io.Dir.cwd().openDir(io, tapes_dir, .{ .iterate = true });
@@ -172,12 +172,12 @@ pub const Tty = struct {
while (try it.next(io)) |entry| {
if (!std.mem.endsWith(u8, entry.name, ".tape")) continue;
tapes += 1;
- const cmd = try std.fmt.allocPrintSentinel(t.arena, "PARDES_RECORD= PARDES_REPLAY='{s}/{s}' {s}timeout 300 '{s}' > '{s}/{s}.replay' 2>&1", .{ tapes_dir, entry.name, if (headless) "" else "PARDES_REPLAY_DUMP=1 ", exe, tapes_dir, entry.name }, 0);
+ const cmd = try std.fmt.allocPrintSentinel(t.arena, "PARDES_RECORD= PARDES_REPLAY='{s}/{s}' {s}timeout 300 '{s}' > '{s}/{s}.replay' 2>&1", .{ tapes_dir, entry.name, if (other_build) "" else "PARDES_REPLAY_DUMP=1 ", exe, tapes_dir, entry.name }, 0);
if (system(cmd) == 0) continue;
const said = readFileAlloc(t.arena, try std.fmt.allocPrint(t.arena, "{s}/{s}.replay", .{ tapes_dir, entry.name })) catch "";
// Another build's replay need agree only in the replica that draws nothing.
- if (headless) if (std.mem.indexOf(u8, said, ": headless replica: ")) |at| {
- if (std.mem.startsWith(u8, std.mem.trimStart(u8, said[at + ": headless replica: ".len ..], "0123456789"), " digests agree")) continue;
+ if (other_build) if (std.mem.indexOf(u8, said, ": skips-render replica: ")) |at| {
+ if (std.mem.startsWith(u8, std.mem.trimStart(u8, said[at + ": skips-render replica: ".len ..], "0123456789"), " digests agree")) continue;
};
std.debug.print(" {s}: its tape {s} did not replay:\n{s}", .{ t.name, entry.name, said });
return error.Diverged;