authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-02-20 07:01:51+01:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-02-20 21:39:54+01:00
log253e641ea3ee9f6f1ba14abc5615b861cbc2e347
treef1e7e592aba4ba6f516c2a8b65bbcb13b406c231
parent8e293ea8bd7fb7f6161604e9e4f4c21525d68827

test: Disable packet timeout for debugger tests.

On my machine, the defaults are 5 seconds (LLDB) and 2 seconds (GDB). These are too low on the CI machines during high load, and the CI system itself already enforces a timeout on jobs anyway, so just disable the timeout altogether.

1 files changed, 7 insertions(+), 1 deletions(-)

test/src/Debugger.zig+7-1
...@@ -2391,6 +2391,7 @@ fn addGdbTest(...@@ -2391,6 +2391,7 @@ fn addGdbTest(
2391 "--batch",2391 "--batch",
2392 "--command",2392 "--command",
2393 },2393 },
2394 "set remotetimeout 0",
2394 commands,2395 commands,
2395 &.{2396 &.{
2396 "--args",2397 "--args",
...@@ -2416,6 +2417,7 @@ fn addLldbTest(...@@ -2416,6 +2417,7 @@ fn addLldbTest(
2416 "--batch",2417 "--batch",
2417 "--source",2418 "--source",
2418 },2419 },
2420 "settings set plugin.process.gdb-remote.packet-timeout 0",
2419 commands,2421 commands,
2420 &.{2422 &.{
2421 "--",2423 "--",
...@@ -2435,6 +2437,7 @@ fn addTest(...@@ -2435,6 +2437,7 @@ fn addTest(
2435 target: Target,2437 target: Target,
2436 files: []const File,2438 files: []const File,
2437 db_argv1: []const []const u8,2439 db_argv1: []const []const u8,
2440 db_commands: []const u8,
2438 commands: []const u8,2441 commands: []const u8,
2439 db_argv2: []const []const u8,2442 db_argv2: []const []const u8,
2440 expected_output: []const []const u8,2443 expected_output: []const []const u8,
...@@ -2476,7 +2479,10 @@ fn addTest(...@@ -2476,7 +2479,10 @@ fn addTest(
2476 const commands_wf = db.b.addWriteFiles();2479 const commands_wf = db.b.addWriteFiles();
2477 const run = std.Build.Step.Run.create(db.b, db.b.fmt("run {s} {s}", .{ name, target.test_name_suffix }));2480 const run = std.Build.Step.Run.create(db.b, db.b.fmt("run {s} {s}", .{ name, target.test_name_suffix }));
2478 run.addArgs(db_argv1);2481 run.addArgs(db_argv1);
2479 run.addFileArg(commands_wf.add(db.b.fmt("{s}.cmd", .{name}), db.b.fmt("{s}\n\nquit {d}\n", .{ commands, success })));2482 run.addFileArg(commands_wf.add(
2483 db.b.fmt("{s}.cmd", .{name}),
2484 db.b.fmt("{s}\n\n{s}\n\nquit {d}\n", .{ db_commands, commands, success }),
2485 ));
2480 run.addArgs(db_argv2);2486 run.addArgs(db_argv2);
2481 run.addArtifactArg(exe);2487 run.addArtifactArg(exe);
2482 for (expected_output) |expected| run.addCheck(.{ .expect_stdout_match = db.b.fmt("{s}\n", .{expected}) });2488 for (expected_output) |expected| run.addCheck(.{ .expect_stdout_match = db.b.fmt("{s}\n", .{expected}) });