Skip to content

Commit fd9d422

Browse files
feat: updating logging to trace level
1 parent c58868a commit fd9d422

File tree

4 files changed

+9
-17
lines changed

4 files changed

+9
-17
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=info \
88+
CPPFLAGS="${TEST_CPPFLAGS}" RUSTFLAGS="${HOST_RUSTFLAGS}" RUST_LOG=trace \
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=info \
99+
CPPFLAGS="${TEST_CPPFLAGS}" RUSTFLAGS="${HOST_RUSTFLAGS}" RUST_LOG=trace \
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=info RUST_BACKTRACE=1 \
117+
RUST_LOG=trace 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/compare.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub fn compare_outputs(intrinsic_name_list: &Vec<String>, runner: &str, target:
1717
.into_par_iter()
1818
.map(|i| {
1919
runner_command(runner)
20-
.arg(format!("./intrinsic-test-programs_{i}"))
20+
.arg(format!("./intrinsic-test-programs-{i}"))
2121
.current_dir("c_programs")
2222
.output()
2323
})

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ pub fn write_bin_cargo_toml(
5151
}
5252

5353
for i in 0..binary_count {
54-
writeln!(w, "[[bin]]")?;
55-
writeln!(w, "name = \"intrinsic-test-programs_{i}\"")?;
54+
writeln!(w, "\n[[bin]]")?;
55+
writeln!(w, "name = \"intrinsic-test-programs-{i}\"")?;
5656
writeln!(w, "path = \"src/main_{i}.rs\"")?;
5757
}
5858

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

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,6 @@ where
9898
.collect::<Result<(), String>>()
9999
.unwrap();
100100

101-
let mut file = File::create("c_programs/main.cpp").unwrap();
102-
write_main_cpp(
103-
&mut file,
104-
Self::PLATFORM_C_DEFINITIONS,
105-
Self::PLATFORM_C_HEADERS,
106-
self.intrinsics().iter().map(|i| i.name.as_str()),
107-
)
108-
.unwrap();
109-
110101
let available_parallelism = std::thread::available_parallelism().unwrap().get();
111102
self.intrinsics()
112103
.par_chunks(available_parallelism)
@@ -130,7 +121,7 @@ where
130121
// This is done because `cpp_compiler_wrapped` is None when
131122
// the --generate-only flag is passed
132123
// compile this cpp file into a .o file
133-
trace!("compiling intrinsic-test-programs_{i}.cpp");
124+
trace!("compiling main_{i}.cpp");
134125
let output = cpp_compiler.compile_object_file(
135126
format!("main_{i}.cpp").as_str(),
136127
format!("main_{i}.o").as_str(),
@@ -146,8 +137,9 @@ where
146137

147138
let output = cpp_compiler.link_executable(
148139
object_files,
149-
format!("intrinsic-test-programs_{i}").as_str(),
140+
format!("intrinsic-test-programs-{i}").as_str(),
150141
);
142+
trace!("finished compiling main_{i}.cpp");
151143

152144
return output;
153145
})

0 commit comments

Comments
 (0)