From: Neo Zhang Date: Thu, 30 Jul 2026 06:04:58 +0000 (+0800) Subject: [UT] enhance UT to show all real unsupported backends (#25234) X-Git-Tag: upstream/0.0.10438~253 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=a6a77bc48d05d8e1f5467b91ec0b5bcc8897b86c;p=pkg%2Fggml%2Fsources%2Fllama.cpp [UT] enhance UT to show all real unsupported backends (#25234) * enhance UT to show real unsupported backends * cont : simplify --------- Co-authored-by: Georgi Gerganov --- diff --git a/tests/test-backend-ops.cpp b/tests/test-backend-ops.cpp index a5b660f47..d0eb173a8 100644 --- a/tests/test-backend-ops.cpp +++ b/tests/test-backend-ops.cpp @@ -1350,18 +1350,22 @@ struct test_case { // check if the backends support the ops bool supported = true; + std::string unsupported_str; for (ggml_backend_t backend : {backend1, backend2}) { for (ggml_tensor * t = ggml_get_first_tensor(ctx.get()); t != NULL; t = ggml_get_next_tensor(ctx.get(), t)) { if (!ggml_backend_supports_op(backend, t)) { supported = false; - break; + if (unsupported_str.empty()) { + unsupported_str = std::string(ggml_backend_name(backend)); + } else { + unsupported_str += ", " + std::string(ggml_backend_name(backend)); + } } } } if (!supported) { - // Create test result for unsupported operation - test_result result(ggml_backend_name(backend1), current_op_name, vars(), "test", + test_result result(unsupported_str, current_op_name, vars(), "test", false, false, "not supported"); print_test_result_locked(output_printer, result);