| ... | @@ -485,7 +485,12 @@ pub fn lowerToBuildSteps( | ... | @@ -485,7 +485,12 @@ pub fn lowerToBuildSteps( |
| 485 | } | 485 | } |
| 486 | const root_source_file = writefiles.getFileSource(update.files.items[0].path).?; | 486 | const root_source_file = writefiles.getFileSource(update.files.items[0].path).?; |
| 487 | | 487 | |
| 488 | const artifact = switch (case.output_mode) { | 488 | const artifact = if (case.is_test) b.addTest(.{ |
| | 489 | .root_source_file = root_source_file, |
| | 490 | .name = case.name, |
| | 491 | .target = case.target, |
| | 492 | .optimize = case.optimize_mode, |
| | 493 | }) else switch (case.output_mode) { |
| 489 | .Obj => b.addObject(.{ | 494 | .Obj => b.addObject(.{ |
| 490 | .root_source_file = root_source_file, | 495 | .root_source_file = root_source_file, |
| 491 | .name = case.name, | 496 | .name = case.name, |
| ... | @@ -498,12 +503,7 @@ pub fn lowerToBuildSteps( | ... | @@ -498,12 +503,7 @@ pub fn lowerToBuildSteps( |
| 498 | .target = case.target, | 503 | .target = case.target, |
| 499 | .optimize = case.optimize_mode, | 504 | .optimize = case.optimize_mode, |
| 500 | }), | 505 | }), |
| 501 | .Exe => if (case.is_test) b.addTest(.{ | 506 | .Exe => b.addExecutable(.{ |
| 502 | .root_source_file = root_source_file, | | |
| 503 | .name = case.name, | | |
| 504 | .target = case.target, | | |
| 505 | .optimize = case.optimize_mode, | | |
| 506 | }) else b.addExecutable(.{ | | |
| 507 | .root_source_file = root_source_file, | 507 | .root_source_file = root_source_file, |
| 508 | .name = case.name, | 508 | .name = case.name, |
| 509 | .target = case.target, | 509 | .target = case.target, |