Showing lists of flaky tests for a builder takes too long
[WebKit-https.git] / Websites / test-results / api / failing-tests.php
1 <?php
2
3 require_once('../include/json-shared.php');
4 require_once('../include/test-results.php');
5
6 function main() {
7     require_existence_of($_GET, array('builder' => '/^[A-Za-z0-9 \(\)\-_]+$/'));
8     $builder_name = $_GET['builder'];
9
10     $db = connect();
11     $builder_row = $db->select_first_row('builders', NULL, array('name' => $builder_name));
12     if (!$builder_row)
13         exit_with_error('BuilderNotFound');
14     $builder_id = $builder_row['id'];
15
16     $generator = new ResultsJSONGenerator($db, $builder_id);
17
18     if ($generator->generate())
19         exit_with_success();
20     else
21         exit_with_error('ResultsNotFound');
22 }
23
24 main();
25
26 ?>