Skip to content

Commit 243fd5d

Browse files
author
ochafik
committed
Update test-cli.cpp
1 parent ca512cc commit 243fd5d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/test-cli.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,13 @@ struct Out {
4242
static Out run(const std::string & cmd) {
4343
auto full_cmd = cmd + " > out/out.txt 2> out/err.txt";
4444
std::cerr << "Running: " << full_cmd << std::endl;
45+
auto out = read("out/out.txt");
46+
auto err = read("out/err.txt");
4547
if (std::system(full_cmd.c_str()) != 0)
46-
throw std::runtime_error("llama-cli binary failed to run.");
48+
throw std::runtime_error("llama-cli binary failed to run.\nstdout: " + out + "\nstderr: " + err);
4749
return {
48-
/* .out = */ read("out/out.txt"),
49-
/* .err = */ read("out/err.txt"),
50+
/* .out = */ out,
51+
/* .err = */ err,
5052
};
5153
}
5254

0 commit comments

Comments
 (0)