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