| ... | ... | @@ -195,6 +195,12 @@ pub const CompareOutputContext = struct { |
| 195 | 195 | debug.panic("Unable to spawn {}: {}\n", full_exe_path, @errorName(err)); |
| 196 | 196 | }; |
| 197 | 197 | |
| 198 | var stdout = Buffer.initNull(b.allocator); |
| 199 | var stderr = Buffer.initNull(b.allocator); |
| 200 | |
| 201 | %%(??child.stdout).readAll(&stdout); |
| 202 | %%(??child.stderr).readAll(&stderr); |
| 203 | |
| 198 | 204 | const term = child.wait() %% |err| { |
| 199 | 205 | debug.panic("Unable to spawn {}: {}\n", full_exe_path, @errorName(err)); |
| 200 | 206 | }; |
| ... | ... | @@ -211,11 +217,6 @@ pub const CompareOutputContext = struct { |
| 211 | 217 | }, |
| 212 | 218 | }; |
| 213 | 219 | |
| 214 | | var stdout = Buffer.initNull(b.allocator); |
| 215 | | var stderr = Buffer.initNull(b.allocator); |
| 216 | | |
| 217 | | %%(??child.stdout).readAll(&stdout); |
| 218 | | %%(??child.stderr).readAll(&stderr); |
| 219 | 220 | |
| 220 | 221 | if (!mem.eql(u8, self.expected_output, stdout.toSliceConst())) { |
| 221 | 222 | %%io.stderr.printf( |
| ... | ... | @@ -521,6 +522,12 @@ pub const CompileErrorContext = struct { |
| 521 | 522 | debug.panic("Unable to spawn {}: {}\n", b.zig_exe, @errorName(err)); |
| 522 | 523 | }; |
| 523 | 524 | |
| 525 | var stdout_buf = Buffer.initNull(b.allocator); |
| 526 | var stderr_buf = Buffer.initNull(b.allocator); |
| 527 | |
| 528 | %%(??child.stdout).readAll(&stdout_buf); |
| 529 | %%(??child.stderr).readAll(&stderr_buf); |
| 530 | |
| 524 | 531 | const term = child.wait() %% |err| { |
| 525 | 532 | debug.panic("Unable to spawn {}: {}\n", b.zig_exe, @errorName(err)); |
| 526 | 533 | }; |
| ... | ... | @@ -537,11 +544,6 @@ pub const CompileErrorContext = struct { |
| 537 | 544 | }, |
| 538 | 545 | }; |
| 539 | 546 | |
| 540 | | var stdout_buf = Buffer.initNull(b.allocator); |
| 541 | | var stderr_buf = Buffer.initNull(b.allocator); |
| 542 | | |
| 543 | | %%(??child.stdout).readAll(&stdout_buf); |
| 544 | | %%(??child.stderr).readAll(&stderr_buf); |
| 545 | 547 | |
| 546 | 548 | const stdout = stdout_buf.toSliceConst(); |
| 547 | 549 | const stderr = stderr_buf.toSliceConst(); |
| ... | ... | @@ -783,6 +785,12 @@ pub const ParseHContext = struct { |
| 783 | 785 | debug.panic("Unable to spawn {}: {}\n", b.zig_exe, @errorName(err)); |
| 784 | 786 | }; |
| 785 | 787 | |
| 788 | var stdout_buf = Buffer.initNull(b.allocator); |
| 789 | var stderr_buf = Buffer.initNull(b.allocator); |
| 790 | |
| 791 | %%(??child.stdout).readAll(&stdout_buf); |
| 792 | %%(??child.stderr).readAll(&stderr_buf); |
| 793 | |
| 786 | 794 | const term = child.wait() %% |err| { |
| 787 | 795 | debug.panic("Unable to spawn {}: {}\n", b.zig_exe, @errorName(err)); |
| 788 | 796 | }; |
| ... | ... | @@ -803,12 +811,6 @@ pub const ParseHContext = struct { |
| 803 | 811 | }, |
| 804 | 812 | }; |
| 805 | 813 | |
| 806 | | var stdout_buf = Buffer.initNull(b.allocator); |
| 807 | | var stderr_buf = Buffer.initNull(b.allocator); |
| 808 | | |
| 809 | | %%(??child.stdout).readAll(&stdout_buf); |
| 810 | | %%(??child.stderr).readAll(&stderr_buf); |
| 811 | | |
| 812 | 814 | const stdout = stdout_buf.toSliceConst(); |
| 813 | 815 | const stderr = stderr_buf.toSliceConst(); |
| 814 | 816 | |