report panicking tests (not pretty yet)

This commit is contained in:
Folkert 2022-07-18 22:15:50 +02:00 committed by Richard Feldman
parent 3129225951
commit 7e5476aa58
No known key found for this signature in database
GPG key ID: 7E4127D1E4241798
3 changed files with 73 additions and 17 deletions

View file

@ -3,6 +3,7 @@ use const_format::concatcp;
use inkwell::context::Context;
use libloading::Library;
use roc_gen_llvm::llvm::build::LlvmBackendMode;
use roc_module::symbol::Symbol;
use roc_types::subs::Subs;
use rustyline::highlight::{Highlighter, PromptInfo};
use rustyline::validate::{self, ValidationContext, ValidationResult, Validator};
@ -198,7 +199,13 @@ pub fn expect_mono_module_to_dylib<'a>(
loaded: MonomorphizedModule<'a>,
opt_level: OptLevel,
mode: LlvmBackendMode,
) -> Result<(libloading::Library, bumpalo::collections::Vec<'a, &'a str>), libloading::Error> {
) -> Result<
(
libloading::Library,
bumpalo::collections::Vec<'a, (Symbol, &'a str)>,
),
libloading::Error,
> {
let target_info = TargetInfo::from(&target);
let MonomorphizedModule {
@ -240,7 +247,7 @@ pub fn expect_mono_module_to_dylib<'a>(
// platform to provide them.
add_default_roc_externs(&env);
let expects = roc_gen_llvm::llvm::build::build_procedures_expose_expects(
let expect_names = roc_gen_llvm::llvm::build::build_procedures_expose_expects(
&env,
opt_level,
&toplevel_expects,
@ -248,6 +255,11 @@ pub fn expect_mono_module_to_dylib<'a>(
entry_point,
);
let expects = bumpalo::collections::Vec::from_iter_in(
toplevel_expects.into_iter().zip(expect_names.into_iter()),
env.arena,
);
env.dibuilder.finalize();
// we don't use the debug info, and it causes weird errors.