diff --git a/hack/jenkins/test-history/gen_history b/hack/jenkins/test-history/gen_history
index 8694704d5ce..ad0efad73ab 100755
--- a/hack/jenkins/test-history/gen_history
+++ b/hack/jenkins/test-history/gen_history
@@ -24,10 +24,12 @@ readonly jenkins="$1"
readonly datestr=$(date +"%Y-%m-%d")
# Create JSON report
-time python gen_json.py "${jenkins}" kubernetes
+time python gen_json.py \
+ "--server=${jenkins}" \
+ "--match=^kubernetes|kubernetes-build|kubelet-gce-e2e-ci"
# 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
+python gen_html.py --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 06f622b9d0c..0f94fa17b30 100755
--- a/hack/jenkins/test-history/gen_html.py
+++ b/hack/jenkins/test-history/gen_html.py
@@ -28,12 +28,23 @@ JSON. That would allow custom filtering and stuff like that.
from __future__ import print_function
import argparse
+import cgi
+import collections
import json
import os
import string
import sys
import time
+
+TestMetadata = collections.namedtuple('TestMetadata', [
+ 'okay',
+ 'unstable',
+ 'failed',
+ 'skipped',
+])
+
+
def gen_tests(data, prefix, exact_match):
"""Creates the HTML for all test cases.
@@ -43,14 +54,10 @@ def gen_tests(data, prefix, exact_match):
exact_match: Only match Jenkins jobs with name equal to prefix.
Returns:
- The HTML as a list of elements along with a tuple of the number of
- passing, unstable, failing, and skipped tests.
+ (html, TestMetadata) for matching tests
"""
html = ['
']
- total_okay = 0
- total_unstable = 0
- total_failed = 0
- total_skipped = 0
+ totals = collections.defaultdict(int)
for test in sorted(data, key=string.lower):
test_html = ['