mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-25 04:52:32 +00:00
improvements to llvm+wasm test running
- run only the wasm tests - nicer linker error reporting
This commit is contained in:
parent
f5c23a219a
commit
bece4342ec
1 changed files with 7 additions and 1 deletions
|
@ -452,9 +452,12 @@ fn llvm_module_to_wasm_file(
|
||||||
.output()
|
.output()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
|
if !output.stderr.is_empty() {
|
||||||
|
panic!("{}", String::from_utf8_lossy(&output.stderr));
|
||||||
|
}
|
||||||
|
|
||||||
assert!(output.status.success(), "{:#?}", output);
|
assert!(output.status.success(), "{:#?}", output);
|
||||||
assert!(output.stdout.is_empty(), "{:#?}", output);
|
assert!(output.stdout.is_empty(), "{:#?}", output);
|
||||||
assert!(output.stderr.is_empty(), "{:#?}", output);
|
|
||||||
|
|
||||||
test_wasm_path
|
test_wasm_path
|
||||||
}
|
}
|
||||||
|
@ -586,6 +589,7 @@ macro_rules! assert_evals_to {
|
||||||
$ignore_problems
|
$ignore_problems
|
||||||
);
|
);
|
||||||
|
|
||||||
|
#[cfg(not(feature = "gen-llvm-wasm"))]
|
||||||
$crate::helpers::llvm::assert_llvm_evals_to!(
|
$crate::helpers::llvm::assert_llvm_evals_to!(
|
||||||
$src,
|
$src,
|
||||||
$expected,
|
$expected,
|
||||||
|
@ -596,6 +600,7 @@ macro_rules! assert_evals_to {
|
||||||
}};
|
}};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unused_macros)]
|
||||||
macro_rules! expect_runtime_error_panic {
|
macro_rules! expect_runtime_error_panic {
|
||||||
($src:expr) => {{
|
($src:expr) => {{
|
||||||
#[cfg(feature = "gen-llvm-wasm")]
|
#[cfg(feature = "gen-llvm-wasm")]
|
||||||
|
@ -607,6 +612,7 @@ macro_rules! expect_runtime_error_panic {
|
||||||
true // ignore problems
|
true // ignore problems
|
||||||
);
|
);
|
||||||
|
|
||||||
|
#[cfg(not(feature = "gen-llvm-wasm"))]
|
||||||
$crate::helpers::llvm::assert_llvm_evals_to!(
|
$crate::helpers::llvm::assert_llvm_evals_to!(
|
||||||
$src,
|
$src,
|
||||||
false, // fake value/type for eval
|
false, // fake value/type for eval
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue