| 1134 | } |
| 1135 | |
| 1136 | int main(int argc, char ** argv) { |
| 1137 | test_args args = parse_cli(argc, argv); |
| 1138 | |
| 1139 | if (args.model.empty()) { |
| 1140 | args.model = get_model_or_exit(1, argv); |
| 1141 | } |
| 1142 | |
| 1143 | { |
| 1144 | std::ifstream file(args.model); |
| 1145 | if (!file.is_open()) { |
| 1146 | fprintf(stderr, "no model '%s' found\n", args.model.c_str()); |
| 1147 | return EXIT_FAILURE; |
| 1148 | } |
| 1149 | } |
| 1150 | |
| 1151 | fprintf(stderr, "using '%s'\n", args.model.c_str()); |
| 1152 | |
| 1153 | llama_backend_init(); |
| 1154 | |
| 1155 | test_params params = { |
| 1156 | /*.model =*/ load_model(args), |
| 1157 | }; |
| 1158 | |
| 1159 | const std::vector<const backend_test_case *> tests = collect_tests_to_run(args.test); |
| 1160 | if (!tests.empty()) { |
| 1161 | run_tests(tests, params); |
| 1162 | } |
| 1163 | |
| 1164 | return 0; |
| 1165 | } |
nothing calls this directly
no test coverage detected