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