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