mirror of
https://github.com/kmc7468/cs420.git
synced 2025-12-16 07:28:52 +00:00
Issue homework 2: irgen
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use lang_c::ast::*;
|
||||
use std::fs::File;
|
||||
use std::fs::{self, File};
|
||||
use std::path::Path;
|
||||
use std::process::Command;
|
||||
use tempfile::tempdir;
|
||||
@@ -35,7 +35,7 @@ pub fn test_irgen(unit: &TranslationUnit, path: &Path) {
|
||||
.expect("failed to compile the given program");
|
||||
|
||||
// Execute compiled executable
|
||||
let status = Command::new(bin_path.clone())
|
||||
let status = Command::new(fs::canonicalize(format!("./{}", bin_path.clone())).unwrap())
|
||||
.status()
|
||||
.expect("failed to execute the compiled executable")
|
||||
.code()
|
||||
|
||||
Reference in New Issue
Block a user