Skip to content

Commit 47b6115

Browse files
authored
Merge pull request sleuthkit#3357 from Taha-Ebrahim/noise-reduction
noise reduction for tsk_cli_runner No need to implement recommended changes now, but it's something to keep in mind.
2 parents 8c156a2 + 2e6c6ea commit 47b6115

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/tools/test_utils.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,11 @@ std::string read_file(FILE* file) {
6363
bool compare_files(FILE* expected, FILE* actual) {
6464
std::string expected_content = read_file(expected);
6565
std::string actual_content = read_file(actual);
66-
67-
std::cout << "Expected File: " << expected_content << '\n';
68-
std::cout << "Output: " << actual_content << '\n';
66+
67+
if (expected_content != actual_content) {
68+
std::cout << "Expected File: " << expected_content << '\n';
69+
std::cout << "Output: " << actual_content << '\n';
70+
}
6971

7072
return expected_content == actual_content;
7173
}
@@ -159,11 +161,9 @@ int run_test(const std::string& cmd,
159161

160162
if (expected_stderr) {
161163
full_cmd = resolved_cmd + " > \"" + stdout_path + "\" 2> \"" + stderr_path + "\"";
162-
std::cout << "[exec] " << full_cmd << '\n';
163164

164165
} else {
165166
full_cmd = resolved_cmd + " > \"" + stdout_path + "\"";
166-
std::cout << "[exec] " << full_cmd << '\n';
167167
}
168168

169169
int exit_code = std::system(full_cmd.c_str());

0 commit comments

Comments
 (0)