Rewrite 'pull-os-versions' script in Javascript to add support for reporting os revis...
authordewei_zhu@apple.com <dewei_zhu@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Mar 2017 08:35:07 +0000 (08:35 +0000)
committerdewei_zhu@apple.com <dewei_zhu@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Mar 2017 08:35:07 +0000 (08:35 +0000)
commit6a33fb2a550a48f04e539c2acdf94ad1959fed70
tree4d8f74fa64a955d7f4e254d5918181828f8924c4
parentd64315735a62b1fcb3613a2b8d6d7b702094d3b9
Rewrite 'pull-os-versions' script in Javascript to add support for reporting os revisions with sub commits.
https://bugs.webkit.org/show_bug.cgi?id=169542

Reviewed by Ryosuke Niwa.

Extend '/api/commits/<repository>/last-reported' to accept a range and return last reported commits in given range.
Rewrite 'pull-os-versions' in JavaScript and add unit tests for it.
Instead of writing query manually while searching criteria contains null columns, use the methods provided in 'db.php'.
Add '.gitignore' file to ommit files generated by while running tests/instances locally.

* .gitignore: Added.
* public/api/commits.php:
* public/api/report-commits.php:
* public/include/commit-log-fetcher.php:
* public/include/db.php: 'null_columns' of prepare_params should be a reference.
* public/include/report-processor.php:
* server-tests/api-commits.js:
(then):
* server-tests/api-report-commits-tests.js:
* server-tests/resources/mock-logger.js: Added.
(MockLogger):
(MockLogger.prototype.log):
(MockLogger.prototype.error):
* server-tests/resources/mock-subprocess.js: Added.
(MockSubprocess.call):
(MockSubprocess.waitingForInvocation):
(MockSubprocess.inject):
(MockSubprocess.reset):
* server-tests/tools-buildbot-triggerable-tests.js:
(MockLogger): Deleted.
(MockLogger.prototype.log): Deleted.
(MockLogger.prototype.error): Deleted.
* server-tests/tools-os-build-fetcher-tests.js: Added.
(beforeEach):
(return.waitingForInvocationPromise.then):
(then):
(string_appeared_here.return.waitingForInvocationPromise.then):
(return.addSlaveForReport.emptyReport.then):
* tools/js/os-build-fetcher.js: Added.
(OSBuildFetcher):
(OSBuildFetcher.prototype._fetchAvailableBuilds):
(OSBuildFetcher.prototype._computeOrder):
(OSBuildFetcher.prototype._commitsForAvailableBuilds.return.this._subprocess.call.then.):
(OSBuildFetcher.prototype._commitsForAvailableBuilds):
(OSBuildFetcher.prototype._addSubCommitsForBuild):
(OSBuildFetcher.prototype._submitCommits):
(OSBuildFetcher.prototype.fetchAndReportNewBuilds):
* tools/js/subprocess.js: Added.
(const.childProcess.require.string_appeared_here.Subprocess.prototype.call):
(const.childProcess.require.string_appeared_here.Subprocess):
* tools/pull-os-versions.js: Added.
(main):
(syncLoop):
* tools/sync-commits.py:
(Repository.fetch_commits_and_submit):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@213976 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed:
Websites/perf.webkit.org/.gitignore [new file with mode: 0644]
Websites/perf.webkit.org/ChangeLog
Websites/perf.webkit.org/public/api/commits.php
Websites/perf.webkit.org/public/api/report-commits.php
Websites/perf.webkit.org/public/include/commit-log-fetcher.php
Websites/perf.webkit.org/public/include/db.php
Websites/perf.webkit.org/public/include/report-processor.php
Websites/perf.webkit.org/server-tests/api-commits.js
Websites/perf.webkit.org/server-tests/api-report-commits-tests.js
Websites/perf.webkit.org/server-tests/resources/mock-logger.js [new file with mode: 0644]
Websites/perf.webkit.org/server-tests/resources/mock-subprocess.js [new file with mode: 0644]
Websites/perf.webkit.org/server-tests/tools-buildbot-triggerable-tests.js
Websites/perf.webkit.org/server-tests/tools-os-build-fetcher-tests.js [new file with mode: 0644]
Websites/perf.webkit.org/tools/js/os-build-fetcher.js [new file with mode: 0644]
Websites/perf.webkit.org/tools/js/subprocess.js [new file with mode: 0644]
Websites/perf.webkit.org/tools/pull-os-versions.js [new file with mode: 0644]
Websites/perf.webkit.org/tools/sync-commits.py