compiletest/runtest/codegen.rs
1use super::TestCx;
2
3impl TestCx<'_> {
4 pub(super) fn run_codegen_test(&self) {
5 if self.config.llvm_filecheck.is_none() {
6 self.fatal("missing --llvm-filecheck");
7 }
8
9 let (proc_res, output_path) = self.compile_test_and_save_ir();
10 if !proc_res.status.success() {
11 self.fatal_proc_rec("compilation failed!", &proc_res);
12 }
13
14 if !self.props.skip_filecheck {
15 let proc_res = self.verify_with_filecheck(&output_path);
16 if !proc_res.status.success() {
17 self.fatal_proc_rec("verification with 'FileCheck' failed", &proc_res);
18 }
19 }
20 }
21}