1 2013-10-24 Ryosuke Niwa <rniwa@webkit.org>
3 Add an instruction on how to setup test-results app
4 https://bugs.webkit.org/show_bug.cgi?id=123321
6 Rubber-stamped by Stephanie Lewis.
8 Added Install.md and updated config.json accordingly.
10 Also moved init-database.sql out of public/include since it doesn't need to be accessible via httpd.
14 * init-database.sql: Moved from public/include/init-database.sql.
16 2013-10-24 Ryosuke Niwa <rniwa@webkit.org>
18 Move everything except ChangeLog and config.json into public directory.
19 https://bugs.webkit.org/show_bug.cgi?id=123319
21 Rubber-stamped by Stephanie Lewis.
24 * admin/admin.css: Removed.
25 * admin/builders.php: Removed.
26 * admin/index.php: Removed.
27 * admin/repositories.php: Removed.
29 * api/failing-tests.php: Removed.
30 * api/manifest.php: Removed.
31 * api/report.php: Removed.
32 * api/results.php: Removed.
33 * common.css: Removed.
34 * config.json: Copied from include/config.json.
36 * include/admin-footer.php: Removed.
37 * include/admin-header.php: Removed.
38 * include/config.json: Removed.
39 * include/db.php: Removed.
40 * include/init-database.sql: Removed.
41 * include/json-shared.php: Removed.
42 * include/test-results.php: Removed.
43 * index.html: Removed.
45 * js/autocompleter.js: Removed.
46 * js/build.js: Removed.
50 * public/admin: Copied from admin.
51 * public/api: Copied from api.
52 * public/common.css: Copied from common.css.
53 * public/include: Copied from include.
54 * public/include/config.json: Removed.
55 * public/include/db.php:
56 * public/index.html: Copied from index.html.
57 * public/js: Copied from js.
58 * public/main.css: Copied from main.css.
60 2013-10-24 Ryosuke Niwa <rniwa@webkit.org>
62 Showing lists of flaky tests for a builder takes too long
63 https://bugs.webkit.org/show_bug.cgi?id=123311
65 Reviewed by Sam Weinig.
67 Generate JSONs for tests failing, flaky, or with wrong expectation at the time a builder reports results
68 instead when the frontend requests to those those results since it takes multiple seconds or minutes to
69 generate those JSON files.
71 * api/failing-tests.php: Moved and renamed to manually generate all JSON files for a given builder.
74 * api/report.php: Manually flush and end the request (to avoid blocking run-webkit-tests on the other side
75 for minutes), then generate JSONs for tests that are failing, are flaky, and have wrong expectations.
77 * api/results.php: Merge format_result_rows here since it's not used anywhere else.
79 * include/config.json: Added the path to the data directory into which JSON files are generated.
82 (configPath): Takes a relative path value from config.json, and resolves it.
84 * include/json-shared.php:
85 (echo_success): Extracted from exit_with_success.
88 * include/test-results.php:
89 (add_builder): Extracted from add_build.
91 (ResultsJSONWriter): Extracted from api/failing-tests.php.
92 (ResultsJSONWriter.__construct):
93 (ResultsJSONWriter.start):
94 (ResultsJSONWriter.end):
95 (ResultsJSONWriter.add_results_for_test_if_matches):
96 (ResultsJSONWriter.pass_for_failure_type):
97 (FailingResultsJSONWriter): Extracted from index.html's TestResultsView._matchesFailureType.
98 (FailingResultsJSONWriter.__construct):
99 (FailingResultsJSONWriter.pass_for_failure_type):
100 (FlakyResultsJSONWriter): Ditto.
101 (FlakyResultsJSONWriter.__construct):
102 (FlakyResultsJSONWriter.pass_for_failure_type):
103 (WrongExpectationsResultsJSONWriter): Ditto.
104 (WrongExpectationsResultsJSONWriter.__construct):
105 (WrongExpectationsResultsJSONWriter.pass_for_failure_type):
106 (ResultsJSONGenerator): Ditto.
107 (ResultsJSONGenerator.__construct):
108 (ResultsJSONGenerator.generate):
109 (ResultsJSONGenerator.open_json_for_failure_type):
110 (ResultsJSONGenerator.write_jsons):
114 (TestResultsView.setBuilders):
115 (TestResultsView._createResultCell): Add a hyperlink to results.html in the tooltip.
116 (TestResultsView.fetchFailingTestsForBuilder): Fetch the generated JSON files.
118 2013-10-23 Ryosuke Niwa <rniwa@webkit.org>
120 Reverted erroneously committed changes from the previous commit.
124 2013-10-23 Ryosuke Niwa <rniwa@webkit.org>
126 Clicking on a test name on the new flakiness dashboard should add a new test pane
127 https://bugs.webkit.org/show_bug.cgi?id=123194
129 Reviewed by Simon Fraser.
131 Added a new click handler on each test name inside the builder test view add a new test pane.
132 Moved the old trac link to a right-arrow inline SVG icon.
134 Also tweaked the style so that the builder test view looks different from other test panes.
137 (TestResultsView._urlFromTest): Extracted from TestResultsView._linkifiedTestName.
138 (TestResultsView._populateBuilderPane): Fetch the test when its name is clicked.
139 Added a circled right arrow for the old trac link.
140 * main.css: Tweaked the style to move the rounded border around the builder test view to be
141 around the form controls to clearly differentiate it from a regular test pane.
143 2013-10-22 Ryosuke Niwa <rniwa@webkit.org>
145 New flakiness dashboard's test pane should show the latest WebKit revision for each builder
146 https://bugs.webkit.org/show_bug.cgi?id=123189
148 Reviewed by Simon Fraser.
151 (TestResultsView._populateTestPane): Call _createTestResultHeader and _createTestResultRow with
152 a list of repository information.
153 (TestResultsView._createTestResultHeader): Optionally creates headers for a list of repositories.
154 (TestResultsView._createTestResultRow): Add a hyperlinked revision information for each builder.
155 Also add a hyperlink to file a Bugzilla bug when there is no bug associated with the test already.
157 (Build.formattedRevision): Extracted from Build.formattedRevisions.
158 (Build.formattedRevisions):
160 2013-10-22 Ryosuke Niwa <rniwa@webkit.org>
162 Make tables on the new flakiness dashboard sortable
163 https://bugs.webkit.org/show_bug.cgi?id=123141
165 Reviewed by Simon Fraser.
167 Use jquery.tablesorter.js to make test and builder tables sortable. The jquery plugin is already used by run-perf-tests.
170 (TestResultsView._populateTestPane): Add tablesorter to the class name and wrap tr's inside a tbody so that tablesorter
172 (TestResultsView._populateBuilderPane): Ditto.
174 (.resultsTable thead): Use cursor: pointer to signify the fact it's clickable.
175 (.resultsTable th): Don't repeat arrows.
176 (.resultsTable th.headerSortUp): Inline SVG up arrow.
177 (.resultsTable th.headerSortDown): Inline SVG down arrow.
179 2013-10-21 Ryosuke Niwa <rniwa@webkit.org>
181 New flakiness dashboard should hyperlink test names, WebKit revisions, and bubbles
182 https://bugs.webkit.org/show_bug.cgi?id=123134
184 Reviewed by Stephanie Lewis.
186 Copied admin.css, admin-header.php, admin-footer.php, builders.php, repositories.php from WebKit Perf Monitor.
187 (Unfortunately WebKit Perf Monitor hasn't been committed into WebKit repository just yet.)
189 Updated various parts of index.html to linkify test names, build numbers, and bubbles (to results page).
191 * admin/admin.css: Added.
192 * admin/builders.php: Added.
193 * admin/index.php: Removed the duplicated code now that it uses admin-header.php.
194 * admin/repositories.php: Added.
195 * api/manifest.php: Use camelCase for blame_url and build_url to be consistent with other JSON properties.
196 Also exported testCategories from config so that we can linkify test names in the dashboard.
197 * include/admin-footer.php: Added.
198 * include/admin-header.php: Added.
199 * include/config.json: Added test categories. This avoids hard-coding the URL to trac in php/js.
200 * include/init-database.sql: Added name and build_url to builders table and category to tests.
201 * include/test-results.php: Assume the test category to be LayoutTest for now.
204 (TestResultsView): Initialize _builders, _slaves, _repositories, _testCategories as dictionaries as intended.
205 (TestResultsView.setTestCategories): Added.
206 (TestResultsView._createResultCell): Dynamically resolve URLs of results page and and build page.
207 (TestResultsView._populateTestPane): Linkify the test name. Unfortunately we don't have a test object anywhere.
208 We need to figure out a way to find the test object here eventually. For now, hard-coding "LayoutTest" works.
209 (TestResultsView._linkifiedTestName): Added.
210 (TestResultsView._createBuildsAndComputeSlownessOfResults): Takes builderId to set "builder" property on each
211 result object as it's used by Build class.
212 (TestResultsView._populateBuilderPane):
216 (Build.buildUrl): Support $builderName so that we don't have to keep repeating builder names in the database.
217 (Build.revision): Don't access [0] if revisions[repositoryId] was undefined.
219 2013-10-21 Ryosuke Niwa <rniwa@webkit.org>
221 New flakiness dashboard should align results by revision numbers
222 https://bugs.webkit.org/show_bug.cgi?id=123129
224 Reviewed by Tim Horton.
226 * include/config.json: Specify the default cache time to be 10 minutes.
227 * include/json-shared.php: Added Expires and Cache-Control headers. It's configurable via config.json.
229 (TestResultsView._createResultCell): Don't put '-' in a result cell without time.
230 (TestResultsView._populateTestPane): Create an array of build times ordered from the newest to the oldest.
231 Not that build.time() is the newest commit time among all repository for each result. e.g. if we had
232 both WebKit and Safari repository information in a given result, the newer of the two will be used.
233 (TestResultsView._createTestResultHeader): Added.
234 (TestResultsView._createBuildsAndComputeSlownessOfResults): Extracted from _createTestResultRow so
235 that _populateTestPane could use Build object before calling _createTestResultRow.
236 (TestResultsView._createTestResultRow): Takes buildTimes. Insert an empty cell for a build time if
237 the current row doesn't contain that a result for that build time.
238 (TestResultsView._populateBuilderPane):
239 * main.css: Tweaked the style so that bubbles are aligned vertically without '-'.
241 (.resultsTable thead th):
242 (.resultsTable .resultCell):
244 (.resultsTable span a):
246 2013-10-21 Ryosuke Niwa <rniwa@webkit.org>
248 New flakiness dashboard show test time, modifiers, and flaky tests
249 https://bugs.webkit.org/show_bug.cgi?id=123119
251 Reviewed by Tim Horton.
253 * api/failing-tests.php: Manually serialize each row in the results to avoid hitting the memory limit.
255 (Database::query): Added.
256 (Database::fetch_next_row): Added.
257 * include/init-database.sql: Added modifiers and time columns to results table.
258 * include/test-results.php:
259 (store_test_results): Update start_time and end_time to the union of the new interval and the existing interval.
260 (recursively_add_test_results): Handle empty $full_name to eliminate the loop over tests in store_test_results.
261 Also verify that each test name, expected and actual results conform to the specific format to prevent XSS.
262 Also use insert_row instead of select_or_insert_row to avoid issuing an unnecessary SQL query.
263 (format_result): Extracted from format_result_rows. Used in failing-tests.php.
265 (TestResultsView): Added _currentBuilderFailureType and _currentBuilderDays.
266 (TestResultsView._createResultCell): Show the test time and the expected result.
267 (TestResultsView._createTestResultRow): Compute the slowest run and also round time to tenth of second for time
268 less than 10s or second if it's more than 10s so that the test time will always be shown in two digits.
269 Also show the bug number and the latest expected result on the left columns after linkifying the bug numbers.
270 (TestResultsView._matchesFailureType): Added. Determines whether results is of a particular failure type.
271 (TestResultsView._populateBuilderPane):
272 (TestResultsView.fetchFailingTestsForBuilder): Store the failure type such as flaky, wrongtestexpectations.
273 (TestResultsView.updateLocationHash):
274 (TestResultsView.loadTestsFromLocationHash):
277 (element): appendChild if an item is a Node. Otherwise, e.g. integer, create a text node out of toString() call.
278 * main.css: Updated styles.
280 2013-10-18 Ryosuke Niwa <rniwa@webkit.org>
282 New flakiness dashboard should support showing the failing tests per builder
283 https://bugs.webkit.org/show_bug.cgi?id=123011
285 Reviewed by Timothy Hatcher.
287 Added the feature. Also did some refactoring to add this feature.
290 * api/failing-tests.php: Added.
291 * api/manifest.php: Removed the code to make maps by id. The work is now done in index.html.
293 * common.css: Added. Extracted from index.html.
294 * include/test-results.php: Extracted parse_revisions_array and format_result_rows from results.php.
297 (TestResultsView.setAvailableTests): Added.
298 (TestResultsView.showTooltip): Fixed the code to compute x and y coordinates of the tooltip to take
299 scrolled positions into account.
300 (TestResultsView._createTestResultRow): Extracted from _populateTestPane.
301 (TestResultsView.fetchTest): Added the code to show "Loading..." in the pane while loading the JSON.
302 (TestResultsView.fetchTests): Respect the doNotUpdateHash flag.
303 (TestResultsView._populateBuilderPane): Added.
304 (TestResultsView.fetchFailingTestsForBuilder): Added.
305 (TestResultsView.updateLocationHash): Serialize builder & builderDays.
306 (TestResultsView.locationHashChanged): Don't delete existing test panes since that's now done in
307 loadTestsFromLocationHash.
308 (TestResultsView.loadTestsFromLocationHash): Take care of both 'tests' and 'builder' components.
309 (fetchManifest): Setup the UI to select a builder.