Run all the tests with the supplied options.
| 277 | |
| 278 | /// Run all the tests with the supplied options. |
| 279 | int run_tests(const std::vector<Base*>& tests, const Options& options) { |
| 280 | Gecode::Support::RandomGenerator seed_sequence(options.seed); |
| 281 | int result = EXIT_SUCCESS; |
| 282 | for (auto test : tests) { |
| 283 | unsigned int test_seed = seed_sequence.next(); |
| 284 | if (!run_test(test, test_seed, options, std::cout)) { |
| 285 | if (opt.stop) { |
| 286 | return EXIT_FAILURE; |
| 287 | } else { |
| 288 | result = EXIT_FAILURE; |
| 289 | } |
| 290 | } |
| 291 | } |
| 292 | return result; |
| 293 | } |
| 294 | |
| 295 | class TestExecutor; |
| 296 |