diff --git a/hack/jenkins/test-history/gen_history b/hack/jenkins/test-history/gen_history index fb5cd4bd2ac..8694704d5ce 100755 --- a/hack/jenkins/test-history/gen_history +++ b/hack/jenkins/test-history/gen_history @@ -26,16 +26,8 @@ readonly datestr=$(date +"%Y-%m-%d") # Create JSON report time python gen_json.py "${jenkins}" kubernetes -# Create static HTML report out of the JSON -python gen_html.py > static/tests.html -python gen_html.py kubernetes-e2e > static/tests-e2e.html -python gen_html.py kubernetes-soak > static/tests-soak.html -python gen_html.py kubernetes-e2e-gce > static/tests-e2e-gce.html -python gen_html.py kubernetes-e2e-gke > static/tests-e2e-gke.html -python gen_html.py kubernetes-upgrade > static/tests-upgrade.html - -# Fill in the last updated time into the template. -cat index_template.html | sed -e "s/TIME/Last updated: ${datestr}/" > static/index.html +# Create static HTML reports out of the JSON +python gen_html.py --suites --prefixes ,e2e,soak,e2e-gce,e2e-gke,upgrade --output-dir static --input tests.json # Upload to GCS readonly bucket="kubernetes-test-history" diff --git a/hack/jenkins/test-history/gen_html.py b/hack/jenkins/test-history/gen_html.py index a4610951944..06f622b9d0c 100755 --- a/hack/jenkins/test-history/gen_html.py +++ b/hack/jenkins/test-history/gen_html.py @@ -27,20 +27,24 @@ JSON. That would allow custom filtering and stuff like that. from __future__ import print_function +import argparse import json +import os import string import sys +import time -def gen_tests(data, prefix): +def gen_tests(data, prefix, exact_match): """Creates the HTML for all test cases. Args: data: Parsed JSON data that was created by gen_json.py. prefix: Considers Jenkins jobs that start with this. + exact_match: Only match Jenkins jobs with name equal to prefix. Returns: - The HTML as a list of elements along with the number of passing, - unstable, failing, and skipped tests. + The HTML as a list of elements along with a tuple of the number of + passing, unstable, failing, and skipped tests. """ html = ['