| 1123 | } |
| 1124 | |
| 1125 | static void run_tests(const std::vector<const backend_test_case *> & tests, const test_params & args) { |
| 1126 | for (const auto & test : tests) { |
| 1127 | fprintf(stderr, "\n=== %s ===\n", test->name.c_str()); |
| 1128 | try { |
| 1129 | test->fn(args); |
| 1130 | } catch (const std::exception & e) { |
| 1131 | fprintf(stderr, "Error running test '%s': %s\n", test->name.c_str(), e.what()); |
| 1132 | exit(EXIT_FAILURE); |
| 1133 | } |
| 1134 | } |
| 1135 | } |
| 1136 | |
| 1137 | int main(int argc, char ** argv) { |
| 1138 | test_args args = parse_cli(argc, argv); |