1 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
3 The new flakiness dashboard should sort builder and test names
4 https://bugs.webkit.org/show_bug.cgi?id=123363
6 Reviewed by Simon Fraser.
8 Sort the forgotten builders in the menu.
12 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
14 The new flakiness dashboard should sort builder and test names
15 https://bugs.webkit.org/show_bug.cgi?id=123363
17 Reviewed by Simon Fraser.
19 Sort builders and tests by their name in each pane.
22 (TestResultsView._populateTestPane): Lexicologically sort builders by their name.
23 (TestResultsView._sortObjectsByName): Added.
24 (TestResultsView._populateBuilderPane): Lexicologically sort builders by their name.
26 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
28 Merge revision columns in flakiness dashboard
29 https://bugs.webkit.org/show_bug.cgi?id=123360
31 Reviewed by Simon Fraser.
33 Merge revision numbers into one cell separated by /, and clearly label them as "latest revisions".
34 Also add colors for missing & audio failures so that they won't be an empty cell.
37 (TestResultsView._createTestResultHeader): Create a single th for the list of repository names.
38 (TestResultsView._createTestResultRow): Use single td for all revision numbers.
40 (.this.formattedRevision): Don't prefix revision numbers with '@' when we're not in the tooltip.
42 (.resultsTable .AUDIO a): Added.
43 (.resultsTable .MISSING a): Added.
45 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
47 One more build fix. Put each latest revision information in an actual td.
51 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
53 Yet another set of build fixes.
55 1. Manually strip / from revisions JSON if there is any.
56 2. Suppress warnings from ob_end_flush.
57 3. Allow "+" in actual and expected results as used in "TEXT+IMAGE".
59 * public/api/report.php:
60 * public/include/test-results.php:
62 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
64 Another build fix. Move .htaccess to public.
67 * public/.htaccess: Copied from .htaccess.
69 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
71 It turns out that the current instruction only works on Mountain Lion.
73 Also fixed some typos.
77 2013-10-24 Ryosuke Niwa <rniwa@webkit.org>
79 Add an instruction on how to setup test-results app
80 https://bugs.webkit.org/show_bug.cgi?id=123321
82 Rubber-stamped by Stephanie Lewis.
84 Added Install.md and updated config.json accordingly.
86 Also moved init-database.sql out of public/include since it doesn't need to be accessible via httpd.
90 * init-database.sql: Moved from public/include/init-database.sql.
92 2013-10-24 Ryosuke Niwa <rniwa@webkit.org>
94 Move everything except ChangeLog and config.json into public directory.
95 https://bugs.webkit.org/show_bug.cgi?id=123319
97 Rubber-stamped by Stephanie Lewis.
100 * admin/admin.css: Removed.
101 * admin/builders.php: Removed.
102 * admin/index.php: Removed.
103 * admin/repositories.php: Removed.
105 * api/failing-tests.php: Removed.
106 * api/manifest.php: Removed.
107 * api/report.php: Removed.
108 * api/results.php: Removed.
109 * common.css: Removed.
110 * config.json: Copied from include/config.json.
112 * include/admin-footer.php: Removed.
113 * include/admin-header.php: Removed.
114 * include/config.json: Removed.
115 * include/db.php: Removed.
116 * include/init-database.sql: Removed.
117 * include/json-shared.php: Removed.
118 * include/test-results.php: Removed.
119 * index.html: Removed.
121 * js/autocompleter.js: Removed.
122 * js/build.js: Removed.
123 * js/dom.js: Removed.
126 * public/admin: Copied from admin.
127 * public/api: Copied from api.
128 * public/common.css: Copied from common.css.
129 * public/include: Copied from include.
130 * public/include/config.json: Removed.
131 * public/include/db.php:
132 * public/index.html: Copied from index.html.
133 * public/js: Copied from js.
134 * public/main.css: Copied from main.css.
136 2013-10-24 Ryosuke Niwa <rniwa@webkit.org>
138 Showing lists of flaky tests for a builder takes too long
139 https://bugs.webkit.org/show_bug.cgi?id=123311
141 Reviewed by Sam Weinig.
143 Generate JSONs for tests failing, flaky, or with wrong expectation at the time a builder reports results
144 instead when the frontend requests to those those results since it takes multiple seconds or minutes to
145 generate those JSON files.
147 * api/failing-tests.php: Moved and renamed to manually generate all JSON files for a given builder.
150 * api/report.php: Manually flush and end the request (to avoid blocking run-webkit-tests on the other side
151 for minutes), then generate JSONs for tests that are failing, are flaky, and have wrong expectations.
153 * api/results.php: Merge format_result_rows here since it's not used anywhere else.
155 * include/config.json: Added the path to the data directory into which JSON files are generated.
158 (configPath): Takes a relative path value from config.json, and resolves it.
160 * include/json-shared.php:
161 (echo_success): Extracted from exit_with_success.
164 * include/test-results.php:
165 (add_builder): Extracted from add_build.
167 (ResultsJSONWriter): Extracted from api/failing-tests.php.
168 (ResultsJSONWriter.__construct):
169 (ResultsJSONWriter.start):
170 (ResultsJSONWriter.end):
171 (ResultsJSONWriter.add_results_for_test_if_matches):
172 (ResultsJSONWriter.pass_for_failure_type):
173 (FailingResultsJSONWriter): Extracted from index.html's TestResultsView._matchesFailureType.
174 (FailingResultsJSONWriter.__construct):
175 (FailingResultsJSONWriter.pass_for_failure_type):
176 (FlakyResultsJSONWriter): Ditto.
177 (FlakyResultsJSONWriter.__construct):
178 (FlakyResultsJSONWriter.pass_for_failure_type):
179 (WrongExpectationsResultsJSONWriter): Ditto.
180 (WrongExpectationsResultsJSONWriter.__construct):
181 (WrongExpectationsResultsJSONWriter.pass_for_failure_type):
182 (ResultsJSONGenerator): Ditto.
183 (ResultsJSONGenerator.__construct):
184 (ResultsJSONGenerator.generate):
185 (ResultsJSONGenerator.open_json_for_failure_type):
186 (ResultsJSONGenerator.write_jsons):
190 (TestResultsView.setBuilders):
191 (TestResultsView._createResultCell): Add a hyperlink to results.html in the tooltip.
192 (TestResultsView.fetchFailingTestsForBuilder): Fetch the generated JSON files.
194 2013-10-23 Ryosuke Niwa <rniwa@webkit.org>
196 Reverted erroneously committed changes from the previous commit.
200 2013-10-23 Ryosuke Niwa <rniwa@webkit.org>
202 Clicking on a test name on the new flakiness dashboard should add a new test pane
203 https://bugs.webkit.org/show_bug.cgi?id=123194
205 Reviewed by Simon Fraser.
207 Added a new click handler on each test name inside the builder test view add a new test pane.
208 Moved the old trac link to a right-arrow inline SVG icon.
210 Also tweaked the style so that the builder test view looks different from other test panes.
213 (TestResultsView._urlFromTest): Extracted from TestResultsView._linkifiedTestName.
214 (TestResultsView._populateBuilderPane): Fetch the test when its name is clicked.
215 Added a circled right arrow for the old trac link.
216 * main.css: Tweaked the style to move the rounded border around the builder test view to be
217 around the form controls to clearly differentiate it from a regular test pane.
219 2013-10-22 Ryosuke Niwa <rniwa@webkit.org>
221 New flakiness dashboard's test pane should show the latest WebKit revision for each builder
222 https://bugs.webkit.org/show_bug.cgi?id=123189
224 Reviewed by Simon Fraser.
227 (TestResultsView._populateTestPane): Call _createTestResultHeader and _createTestResultRow with
228 a list of repository information.
229 (TestResultsView._createTestResultHeader): Optionally creates headers for a list of repositories.
230 (TestResultsView._createTestResultRow): Add a hyperlinked revision information for each builder.
231 Also add a hyperlink to file a Bugzilla bug when there is no bug associated with the test already.
233 (Build.formattedRevision): Extracted from Build.formattedRevisions.
234 (Build.formattedRevisions):
236 2013-10-22 Ryosuke Niwa <rniwa@webkit.org>
238 Make tables on the new flakiness dashboard sortable
239 https://bugs.webkit.org/show_bug.cgi?id=123141
241 Reviewed by Simon Fraser.
243 Use jquery.tablesorter.js to make test and builder tables sortable. The jquery plugin is already used by run-perf-tests.
246 (TestResultsView._populateTestPane): Add tablesorter to the class name and wrap tr's inside a tbody so that tablesorter
248 (TestResultsView._populateBuilderPane): Ditto.
250 (.resultsTable thead): Use cursor: pointer to signify the fact it's clickable.
251 (.resultsTable th): Don't repeat arrows.
252 (.resultsTable th.headerSortUp): Inline SVG up arrow.
253 (.resultsTable th.headerSortDown): Inline SVG down arrow.
255 2013-10-21 Ryosuke Niwa <rniwa@webkit.org>
257 New flakiness dashboard should hyperlink test names, WebKit revisions, and bubbles
258 https://bugs.webkit.org/show_bug.cgi?id=123134
260 Reviewed by Stephanie Lewis.
262 Copied admin.css, admin-header.php, admin-footer.php, builders.php, repositories.php from WebKit Perf Monitor.
263 (Unfortunately WebKit Perf Monitor hasn't been committed into WebKit repository just yet.)
265 Updated various parts of index.html to linkify test names, build numbers, and bubbles (to results page).
267 * admin/admin.css: Added.
268 * admin/builders.php: Added.
269 * admin/index.php: Removed the duplicated code now that it uses admin-header.php.
270 * admin/repositories.php: Added.
271 * api/manifest.php: Use camelCase for blame_url and build_url to be consistent with other JSON properties.
272 Also exported testCategories from config so that we can linkify test names in the dashboard.
273 * include/admin-footer.php: Added.
274 * include/admin-header.php: Added.
275 * include/config.json: Added test categories. This avoids hard-coding the URL to trac in php/js.
276 * include/init-database.sql: Added name and build_url to builders table and category to tests.
277 * include/test-results.php: Assume the test category to be LayoutTest for now.
280 (TestResultsView): Initialize _builders, _slaves, _repositories, _testCategories as dictionaries as intended.
281 (TestResultsView.setTestCategories): Added.
282 (TestResultsView._createResultCell): Dynamically resolve URLs of results page and and build page.
283 (TestResultsView._populateTestPane): Linkify the test name. Unfortunately we don't have a test object anywhere.
284 We need to figure out a way to find the test object here eventually. For now, hard-coding "LayoutTest" works.
285 (TestResultsView._linkifiedTestName): Added.
286 (TestResultsView._createBuildsAndComputeSlownessOfResults): Takes builderId to set "builder" property on each
287 result object as it's used by Build class.
288 (TestResultsView._populateBuilderPane):
292 (Build.buildUrl): Support $builderName so that we don't have to keep repeating builder names in the database.
293 (Build.revision): Don't access [0] if revisions[repositoryId] was undefined.
295 2013-10-21 Ryosuke Niwa <rniwa@webkit.org>
297 New flakiness dashboard should align results by revision numbers
298 https://bugs.webkit.org/show_bug.cgi?id=123129
300 Reviewed by Tim Horton.
302 * include/config.json: Specify the default cache time to be 10 minutes.
303 * include/json-shared.php: Added Expires and Cache-Control headers. It's configurable via config.json.
305 (TestResultsView._createResultCell): Don't put '-' in a result cell without time.
306 (TestResultsView._populateTestPane): Create an array of build times ordered from the newest to the oldest.
307 Not that build.time() is the newest commit time among all repository for each result. e.g. if we had
308 both WebKit and Safari repository information in a given result, the newer of the two will be used.
309 (TestResultsView._createTestResultHeader): Added.
310 (TestResultsView._createBuildsAndComputeSlownessOfResults): Extracted from _createTestResultRow so
311 that _populateTestPane could use Build object before calling _createTestResultRow.
312 (TestResultsView._createTestResultRow): Takes buildTimes. Insert an empty cell for a build time if
313 the current row doesn't contain that a result for that build time.
314 (TestResultsView._populateBuilderPane):
315 * main.css: Tweaked the style so that bubbles are aligned vertically without '-'.
317 (.resultsTable thead th):
318 (.resultsTable .resultCell):
320 (.resultsTable span a):
322 2013-10-21 Ryosuke Niwa <rniwa@webkit.org>
324 New flakiness dashboard show test time, modifiers, and flaky tests
325 https://bugs.webkit.org/show_bug.cgi?id=123119
327 Reviewed by Tim Horton.
329 * api/failing-tests.php: Manually serialize each row in the results to avoid hitting the memory limit.
331 (Database::query): Added.
332 (Database::fetch_next_row): Added.
333 * include/init-database.sql: Added modifiers and time columns to results table.
334 * include/test-results.php:
335 (store_test_results): Update start_time and end_time to the union of the new interval and the existing interval.
336 (recursively_add_test_results): Handle empty $full_name to eliminate the loop over tests in store_test_results.
337 Also verify that each test name, expected and actual results conform to the specific format to prevent XSS.
338 Also use insert_row instead of select_or_insert_row to avoid issuing an unnecessary SQL query.
339 (format_result): Extracted from format_result_rows. Used in failing-tests.php.
341 (TestResultsView): Added _currentBuilderFailureType and _currentBuilderDays.
342 (TestResultsView._createResultCell): Show the test time and the expected result.
343 (TestResultsView._createTestResultRow): Compute the slowest run and also round time to tenth of second for time
344 less than 10s or second if it's more than 10s so that the test time will always be shown in two digits.
345 Also show the bug number and the latest expected result on the left columns after linkifying the bug numbers.
346 (TestResultsView._matchesFailureType): Added. Determines whether results is of a particular failure type.
347 (TestResultsView._populateBuilderPane):
348 (TestResultsView.fetchFailingTestsForBuilder): Store the failure type such as flaky, wrongtestexpectations.
349 (TestResultsView.updateLocationHash):
350 (TestResultsView.loadTestsFromLocationHash):
353 (element): appendChild if an item is a Node. Otherwise, e.g. integer, create a text node out of toString() call.
354 * main.css: Updated styles.
356 2013-10-18 Ryosuke Niwa <rniwa@webkit.org>
358 New flakiness dashboard should support showing the failing tests per builder
359 https://bugs.webkit.org/show_bug.cgi?id=123011
361 Reviewed by Timothy Hatcher.
363 Added the feature. Also did some refactoring to add this feature.
366 * api/failing-tests.php: Added.
367 * api/manifest.php: Removed the code to make maps by id. The work is now done in index.html.
369 * common.css: Added. Extracted from index.html.
370 * include/test-results.php: Extracted parse_revisions_array and format_result_rows from results.php.
373 (TestResultsView.setAvailableTests): Added.
374 (TestResultsView.showTooltip): Fixed the code to compute x and y coordinates of the tooltip to take
375 scrolled positions into account.
376 (TestResultsView._createTestResultRow): Extracted from _populateTestPane.
377 (TestResultsView.fetchTest): Added the code to show "Loading..." in the pane while loading the JSON.
378 (TestResultsView.fetchTests): Respect the doNotUpdateHash flag.
379 (TestResultsView._populateBuilderPane): Added.
380 (TestResultsView.fetchFailingTestsForBuilder): Added.
381 (TestResultsView.updateLocationHash): Serialize builder & builderDays.
382 (TestResultsView.locationHashChanged): Don't delete existing test panes since that's now done in
383 loadTestsFromLocationHash.
384 (TestResultsView.loadTestsFromLocationHash): Take care of both 'tests' and 'builder' components.
385 (fetchManifest): Setup the UI to select a builder.