| ... | @@ -349,25 +349,22 @@ pub const CompareOutputContext = struct { | ... | @@ -349,25 +349,22 @@ pub const CompareOutputContext = struct { |
| 349 | | 349 | |
| 350 | switch (case.special) { | 350 | switch (case.special) { |
| 351 | Special.Asm => { | 351 | Special.Asm => { |
| 352 | const obj_path = %%os.path.join(b.allocator, "test_artifacts", "test.o"); | | |
| 353 | const annotated_case_name = %%fmt.allocPrint(self.b.allocator, "assemble-and-link {}", case.name); | 352 | const annotated_case_name = %%fmt.allocPrint(self.b.allocator, "assemble-and-link {}", case.name); |
| 354 | test (self.test_filter) |filter| { | 353 | test (self.test_filter) |filter| { |
| 355 | if (mem.indexOf(u8, annotated_case_name, filter) == null) | 354 | if (mem.indexOf(u8, annotated_case_name, filter) == null) |
| 356 | return; | 355 | return; |
| 357 | } | 356 | } |
| 358 | | 357 | |
| 359 | const obj = b.addAssemble("test", root_src); | 358 | const assembly = b.addAssemble("test", root_src); |
| 360 | obj.setOutputPath(obj_path); | | |
| 361 | | 359 | |
| 362 | for (case.sources.toSliceConst()) |src_file| { | 360 | for (case.sources.toSliceConst()) |src_file| { |
| 363 | const expanded_src_path = %%os.path.join(b.allocator, "test_artifacts", src_file.filename); | 361 | const expanded_src_path = %%os.path.join(b.allocator, "test_artifacts", src_file.filename); |
| 364 | const write_src = b.addWriteFile(expanded_src_path, src_file.source); | 362 | const write_src = b.addWriteFile(expanded_src_path, src_file.source); |
| 365 | obj.step.dependOn(&write_src.step); | 363 | assembly.step.dependOn(&write_src.step); |
| 366 | } | 364 | } |
| 367 | | 365 | |
| 368 | const exe = b.addLinkExecutable("test"); | 366 | const exe = b.addLinkExecutable("test"); |
| 369 | exe.step.dependOn(&obj.step); | 367 | exe.addAssembly(assembly); |
| 370 | exe.addObjectFile(obj_path); | | |
| 371 | exe.setOutputPath(exe_path); | 368 | exe.setOutputPath(exe_path); |
| 372 | | 369 | |
| 373 | const run_and_cmp_output = RunCompareOutputStep.create(self, exe_path, annotated_case_name, | 370 | const run_and_cmp_output = RunCompareOutputStep.create(self, exe_path, annotated_case_name, |