Adding Fuzz Introspector build logs to the webpage (#7520)

* Adding Fuzz Introspector build logs to the webpage

* Skipping badge update for introspector builds
This commit is contained in:
Navidem 2022-04-07 17:42:40 -07:00 committed by GitHub
parent 4005da3784
commit bf819daf54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 1 deletions

View File

@ -38,6 +38,7 @@ STATUS_BUCKET = 'oss-fuzz-build-logs'
FUZZING_STATUS_FILENAME = 'status.json'
COVERAGE_STATUS_FILENAME = 'status-coverage.json'
INTROSPECTOR_STATUS_FILENAME = 'status-introspector.json'
# pylint: disable=invalid-name
_client = None
@ -279,7 +280,9 @@ def main():
with ndb.Client().context():
configs = ((build_project.FUZZING_BUILD_TYPE, FUZZING_STATUS_FILENAME),
(build_and_run_coverage.COVERAGE_BUILD_TYPE,
COVERAGE_STATUS_FILENAME))
COVERAGE_STATUS_FILENAME),
(build_and_run_coverage.INTROSPECTOR_BUILD_TYPE,
INTROSPECTOR_STATUS_FILENAME))
for tag, filename in configs:
update_build_status(tag, filename)

View File

@ -131,6 +131,7 @@ limitations under the License. -->
<paper-tabs selected="fuzzing" id="build_type" attr-for-selected="type" on-click="onChanged">
<paper-tab type="fuzzing">Fuzzing Builds</paper-tab>
<paper-tab type="coverage">Coverage Builds</paper-tab>
<paper-tab type="introspector">Introspector Builds</paper-tab>
</paper-tabs>
</div>
<div class="card-content">
@ -212,6 +213,7 @@ limitations under the License. -->
</div>
<iron-ajax id="status_fuzzing" auto handle-as="json" url="/status.json" on-response="onResponseForFuzzing"></iron-ajax>
<iron-ajax id="status_coverage" auto handle-as="json" url="/status-coverage.json" on-response="onResponseForCoverage"></iron-ajax>
<iron-ajax id="status_introspector" auto handle-as="json" url="/status-introspector.json" on-response="onResponseForIntrospector"></iron-ajax>
<iron-ajax id="logxhr" handle-as="text" on-response="onLogResponse"></iron-ajax>
</template>
@ -281,6 +283,10 @@ limitations under the License. -->
this.status_coverage = e.detail.response;
}
onResponseForIntrospector(e) {
this.status_introspector = e.detail.response;
}
onLogResponse(e) {
this.log = e.detail.response;
this.loading_log = false;
@ -295,6 +301,8 @@ limitations under the License. -->
onChanged(e) {
if (this.$.build_type.selected == "coverage") {
this.status = this.status_coverage;
} else if (this.$.build_type.selected == "introspector") {
this.status = this.status_introspector;
} else {
this.status = this.status_fuzzing;
}