mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 00:24:34 +00:00
Get tests working
This commit is contained in:
parent
3662c90346
commit
4ec213a114
2 changed files with 75 additions and 71 deletions
|
@ -1,5 +1,7 @@
|
|||
#![cfg(test)]
|
||||
|
||||
use std::io::Read;
|
||||
|
||||
use indoc::indoc;
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
|
@ -160,10 +162,20 @@ fn run_with_valgrind(binary_path: &std::path::Path) {
|
|||
.to_str()
|
||||
.unwrap();
|
||||
|
||||
let (valgrind_out, raw_xml) =
|
||||
cli_utils::helpers::run_with_valgrind([], &[generated_filename.to_string()]);
|
||||
let valgrind_out = cli_utils::helpers::Run::new_roc()
|
||||
.arg(generated_filename)
|
||||
.run_with_valgrind();
|
||||
|
||||
if valgrind_out.status.success() {
|
||||
let mut raw_xml = String::new();
|
||||
|
||||
valgrind_out
|
||||
.valgrind_xml
|
||||
.as_ref()
|
||||
.unwrap()
|
||||
.read_to_string(&mut raw_xml)
|
||||
.unwrap();
|
||||
|
||||
let memory_errors = extract_valgrind_errors(&raw_xml).unwrap_or_else(|err| {
|
||||
panic!(
|
||||
indoc!(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue