Skip to content

Commit 1062fc6

Browse files
committed
intrinsic-test: display more logs in CI
1 parent 15466e9 commit 1062fc6

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

ci/intrinsic-test.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ esac
8585
# Arm specific
8686
case "${TARGET}" in
8787
aarch64-unknown-linux-gnu*|armv7-unknown-linux-gnueabihf*)
88-
CPPFLAGS="${TEST_CPPFLAGS}" RUSTFLAGS="${HOST_RUSTFLAGS}" RUST_LOG=warn \
88+
CPPFLAGS="${TEST_CPPFLAGS}" RUSTFLAGS="${HOST_RUSTFLAGS}" RUST_LOG=info \
8989
cargo run "${INTRINSIC_TEST}" "${PROFILE}" \
9090
--bin intrinsic-test -- intrinsics_data/arm_intrinsics.json \
9191
--runner "${TEST_RUNNER}" \
@@ -96,7 +96,7 @@ case "${TARGET}" in
9696
;;
9797

9898
aarch64_be-unknown-linux-gnu*)
99-
CPPFLAGS="${TEST_CPPFLAGS}" RUSTFLAGS="${HOST_RUSTFLAGS}" RUST_LOG=warn \
99+
CPPFLAGS="${TEST_CPPFLAGS}" RUSTFLAGS="${HOST_RUSTFLAGS}" RUST_LOG=info \
100100
cargo run "${INTRINSIC_TEST}" "${PROFILE}" \
101101
--bin intrinsic-test -- intrinsics_data/arm_intrinsics.json \
102102
--runner "${TEST_RUNNER}" \
@@ -114,7 +114,7 @@ case "${TARGET}" in
114114
# Hence the use of `env -u`.
115115
env -u CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER \
116116
CPPFLAGS="${TEST_CPPFLAGS}" RUSTFLAGS="${HOST_RUSTFLAGS}" \
117-
RUST_LOG=warn RUST_BACKTRACE=1 \
117+
RUST_LOG=info RUST_BACKTRACE=1 \
118118
cargo run "${INTRINSIC_TEST}" "${PROFILE}" \
119119
--bin intrinsic-test -- intrinsics_data/x86-intel.xml \
120120
--runner "${TEST_RUNNER}" \

crates/intrinsic-test/src/common/mod.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,16 @@ pub trait SupportedArchitectureTest {
7979
trace!("compiling mod_{i}.cpp");
8080
if let Some(cpp_compiler) = cpp_compiler_wrapped.as_ref() {
8181
let compile_output = cpp_compiler
82-
.compile_object_file(&format!("mod_{i}.cpp"), &format!("mod_{i}.o"));
82+
.compile_object_file(&format!("mod_{i}.cpp"), &format!("mod_{i}.o"))
83+
.map_err(|e| format!("Error compiling mod_{i}.cpp: {e:?}"))?;
84+
85+
assert!(
86+
compile_output.status.success(),
87+
"{}",
88+
String::from_utf8_lossy(&compile_output.stderr)
89+
);
8390

8491
trace!("finished compiling mod_{i}.cpp");
85-
if let Err(compile_error) = compile_output {
86-
return Err(format!("Error compiling mod_{i}.cpp: {compile_error:?}"));
87-
}
8892
}
8993
Ok(())
9094
})

crates/intrinsic-test/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ fn run(test_environment: impl SupportedArchitectureTest) {
3434
if !test_environment.build_rust_file() {
3535
std::process::exit(3);
3636
}
37-
info!("comaparing outputs");
37+
info!("comparing outputs");
3838
if !test_environment.compare_outputs() {
3939
std::process::exit(1);
4040
}

crates/intrinsic-test/src/x86/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ impl SupportedArchitectureTest for X86ArchitectureTest {
4747
get_xml_intrinsics(&cli_options.filename).expect("Error parsing input file");
4848

4949
intrinsics.sort_by(|a, b| a.name.cmp(&b.name));
50-
intrinsics.dedup();
50+
intrinsics.dedup_by(|a, b| a.name == b.name);
5151

5252
let sample_percentage: usize = cli_options.sample_percentage as usize;
5353
let sample_size = (intrinsics.len() * sample_percentage) / 100;

0 commit comments

Comments
 (0)