| ... | @@ -18,14 +18,13 @@ const Step = @import("../Step.zig"); | ... | @@ -18,14 +18,13 @@ const Step = @import("../Step.zig"); |
| 18 | const Maker = @import("../../Maker.zig"); | 18 | const Maker = @import("../../Maker.zig"); |
| 19 | const Fuzz = @import("../../Maker/Fuzz.zig"); | 19 | const Fuzz = @import("../../Maker/Fuzz.zig"); |
| 20 | | 20 | |
| 21 | /// If this is a Zig unit test binary, this tracks the names of the unit | 21 | /// If this is a Zig unit test binary, this tracks the names of the unit tests that are also fuzz tests. |
| 22 | /// tests that are also fuzz tests. Indexes cannot be used as they may | 22 | /// Indexes cannot be used as they may change between reruns. Memory owned by `Maker.gpa`. |
| 23 | /// change between reruns. | | |
| 24 | fuzz_tests: std.ArrayList([]const u8) = .empty, | 23 | fuzz_tests: std.ArrayList([]const u8) = .empty, |
| 25 | cached_test_metadata: ?CachedTestMetadata = null, | 24 | cached_test_metadata: ?CachedTestMetadata = null, |
| 26 | | 25 | |
| 27 | /// Populated during the fuzz phase if this run step corresponds to a unit test | 26 | /// Populated during the fuzz phase if this run step corresponds to a unit test executable that contains fuzz |
| 28 | /// executable that contains fuzz tests. | 27 | /// tests. `Path.sub_path` owned by `Maker.gpa`. |
| 29 | rebuilt_executable: ?Path = null, | 28 | rebuilt_executable: ?Path = null, |
| 30 | | 29 | |
| 31 | pub fn make( | 30 | pub fn make( |
| ... | @@ -376,6 +375,7 @@ pub fn make( | ... | @@ -376,6 +375,7 @@ pub fn make( |
| 376 | pub fn deinit(run: *Run, gpa: Allocator, io: Io) void { | 375 | pub fn deinit(run: *Run, gpa: Allocator, io: Io) void { |
| 377 | _ = io; | 376 | _ = io; |
| 378 | run.fuzz_tests.deinit(gpa); | 377 | run.fuzz_tests.deinit(gpa); |
| | 378 | if (run.rebuilt_executable) |p| gpa.free(p.sub_path); |
| 379 | } | 379 | } |
| 380 | | 380 | |
| 381 | fn thirdPartyToggle( | 381 | fn thirdPartyToggle( |