tests : disable system() calls (#6198)

ggml-ci
This commit is contained in:
Georgi Gerganov 2024-03-21 16:20:05 +02:00 committed by GitHub
parent 03a8f8fafe
commit 924ce1dce7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -803,18 +803,18 @@ int main() {
tc.verify_status(FAILURE);
}
});
test_all("Python", [](const TestCase & tc) {
write("test-json-schema-input.tmp", tc.schema);
tc.verify_status(std::system(
"python ./examples/json-schema-to-grammar.py test-json-schema-input.tmp > test-grammar-output.tmp") == 0 ? SUCCESS : FAILURE);
tc.verify(read("test-grammar-output.tmp"));
});
test_all("JavaScript", [](const TestCase & tc) {
write("test-json-schema-input.tmp", tc.schema);
tc.verify_status(std::system(
"node ./tests/run-json-schema-to-grammar.mjs test-json-schema-input.tmp > test-grammar-output.tmp") == 0 ? SUCCESS : FAILURE);
tc.verify(read("test-grammar-output.tmp"));
});
//test_all("Python", [](const TestCase & tc) {
// write("test-json-schema-input.tmp", tc.schema);
// tc.verify_status(std::system(
// "python ./examples/json-schema-to-grammar.py test-json-schema-input.tmp > test-grammar-output.tmp") == 0 ? SUCCESS : FAILURE);
// tc.verify(read("test-grammar-output.tmp"));
//});
//test_all("JavaScript", [](const TestCase & tc) {
// write("test-json-schema-input.tmp", tc.schema);
// tc.verify_status(std::system(
// "node ./tests/run-json-schema-to-grammar.mjs test-json-schema-input.tmp > test-grammar-output.tmp") == 0 ? SUCCESS : FAILURE);
// tc.verify(read("test-grammar-output.tmp"));
//});
test_all("Check Expectations Validity", [](const TestCase & tc) {
if (tc.expected_status == SUCCESS) {