| ... | ... | @@ -811,23 +811,21 @@ pub const CompileErrorContext = struct { |
| 811 | 811 | pub fn addCase(self: *CompileErrorContext, case: *const TestCase) void { |
| 812 | 812 | const b = self.b; |
| 813 | 813 | |
| 814 | | for (self.modes) |mode| { |
| 815 | | const annotated_case_name = fmt.allocPrint(self.b.allocator, "compile-error {} ({})", case.name, @tagName(mode)) catch unreachable; |
| 816 | | if (self.test_filter) |filter| { |
| 817 | | if (mem.indexOf(u8, annotated_case_name, filter) == null) continue; |
| 818 | | } |
| 814 | const annotated_case_name = fmt.allocPrint(self.b.allocator, "compile-error {}", case.name) catch unreachable; |
| 815 | if (self.test_filter) |filter| { |
| 816 | if (mem.indexOf(u8, annotated_case_name, filter) == null) return; |
| 817 | } |
| 819 | 818 | |
| 820 | | const compile_and_cmp_errors = CompileCmpOutputStep.create(self, annotated_case_name, case, mode); |
| 821 | | self.step.dependOn(&compile_and_cmp_errors.step); |
| 819 | const compile_and_cmp_errors = CompileCmpOutputStep.create(self, annotated_case_name, case, .Debug); |
| 820 | self.step.dependOn(&compile_and_cmp_errors.step); |
| 822 | 821 | |
| 823 | | for (case.sources.toSliceConst()) |src_file| { |
| 824 | | const expanded_src_path = fs.path.join( |
| 825 | | b.allocator, |
| 826 | | [_][]const u8{ b.cache_root, src_file.filename }, |
| 827 | | ) catch unreachable; |
| 828 | | const write_src = b.addWriteFile(expanded_src_path, src_file.source); |
| 829 | | compile_and_cmp_errors.step.dependOn(&write_src.step); |
| 830 | | } |
| 822 | for (case.sources.toSliceConst()) |src_file| { |
| 823 | const expanded_src_path = fs.path.join( |
| 824 | b.allocator, |
| 825 | [_][]const u8{ b.cache_root, src_file.filename }, |
| 826 | ) catch unreachable; |
| 827 | const write_src = b.addWriteFile(expanded_src_path, src_file.source); |
| 828 | compile_and_cmp_errors.step.dependOn(&write_src.step); |
| 831 | 829 | } |
| 832 | 830 | } |
| 833 | 831 | }; |