tool-call
: add LLAMA_UPDATE_GOLDENS env for test-chat-template
This commit is contained in:
parent
c773516d57
commit
b35aa4ae1c
1 changed files with 5 additions and 1 deletions
|
@ -117,7 +117,11 @@ static void test_jinja_templates() {
|
||||||
} catch (const std::runtime_error & e) {
|
} catch (const std::runtime_error & e) {
|
||||||
actual = "ERROR: " + std::string(e.what());
|
actual = "ERROR: " + std::string(e.what());
|
||||||
}
|
}
|
||||||
assert_equals(expected, actual);
|
if (getenv("LLAMA_UPDATE_GOLDENS")) {
|
||||||
|
std::ofstream(golden_file) << actual;
|
||||||
|
} else {
|
||||||
|
assert_equals(expected, actual);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!found_goldens) {
|
if (!found_goldens) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue