| ... | @@ -872,6 +872,14 @@ pub const TestOptions = struct { | ... | @@ -872,6 +872,14 @@ pub const TestOptions = struct { |
| 872 | zig_lib_dir: ?LazyPath = null, | 872 | zig_lib_dir: ?LazyPath = null, |
| 873 | }; | 873 | }; |
| 874 | | 874 | |
| | 875 | /// Creates an executable containing unit tests. |
| | 876 | /// |
| | 877 | /// Equivalent to running the command `zig test --test-no-exec ...`. |
| | 878 | /// |
| | 879 | /// **This step does not run the unit tests**. Typically, the result of this |
| | 880 | /// function will be passed to `addRunArtifact`, creating a `Step.Run`. These |
| | 881 | /// two steps are separated because they are independently configured and |
| | 882 | /// cached. |
| 875 | pub fn addTest(b: *Build, options: TestOptions) *Step.Compile { | 883 | pub fn addTest(b: *Build, options: TestOptions) *Step.Compile { |
| 876 | return Step.Compile.create(b, .{ | 884 | return Step.Compile.create(b, .{ |
| 877 | .name = options.name, | 885 | .name = options.name, |