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