fix build logic due to state mutations and break the API accordingly
* remove setName, setFilter, and setTestRunner. Please set these options directly when creating the CompileStep. * removed unused field * remove computeOutFileNames and inline the logic, making clear the goal of avoiding state mutations after the build step is created.
This commit is contained in:
@@ -539,6 +539,8 @@ pub const TestOptions = struct {
|
||||
optimize: std.builtin.Mode = .Debug,
|
||||
version: ?std.builtin.Version = null,
|
||||
max_rss: usize = 0,
|
||||
filter: ?[]const u8 = null,
|
||||
test_runner: ?[]const u8 = null,
|
||||
};
|
||||
|
||||
pub fn addTest(b: *Build, options: TestOptions) *CompileStep {
|
||||
@@ -549,6 +551,8 @@ pub fn addTest(b: *Build, options: TestOptions) *CompileStep {
|
||||
.target = options.target,
|
||||
.optimize = options.optimize,
|
||||
.max_rss = options.max_rss,
|
||||
.filter = options.filter,
|
||||
.test_runner = options.test_runner,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user