From ab87db4ad8e16e36f99303933db5267946e7bb34 Mon Sep 17 00:00:00 2001 From: Steve Block Date: Mon, 13 Sep 2010 17:22:17 +0100 Subject: Update DumpRenderTree2 to only calculate the WebKit revision once per test run This is obtained by a HTTP request to ThirdPartyProject.prop Change-Id: I34e310cf52fbcef24bb2a76e64aab5263b3052f1 --- .../com/android/dumprendertree2/Summarizer.java | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'tests/DumpRenderTree2/src') diff --git a/tests/DumpRenderTree2/src/com/android/dumprendertree2/Summarizer.java b/tests/DumpRenderTree2/src/com/android/dumprendertree2/Summarizer.java index b61e145..3763bf2 100644 --- a/tests/DumpRenderTree2/src/com/android/dumprendertree2/Summarizer.java +++ b/tests/DumpRenderTree2/src/com/android/dumprendertree2/Summarizer.java @@ -201,9 +201,7 @@ public class Summarizer { private FileFilter mFileFilter; private String mResultsRootDirPath; - private String mTestsRelativePath; - private Date mDate; public Summarizer(FileFilter fileFilter, String resultsRootDirPath) { @@ -243,8 +241,9 @@ public class Summarizer { } public void summarize() { - createHtmlDetails(); - createTxtSummary(); + String webKitRevision = getWebKitRevision(); + createHtmlDetails(webKitRevision); + createTxtSummary(webKitRevision); } public void reset() { @@ -255,7 +254,7 @@ public class Summarizer { mDate = new Date(); } - private void createTxtSummary() { + private void createTxtSummary(String webKitRevision) { StringBuilder txt = new StringBuilder(); SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); @@ -263,7 +262,7 @@ public class Summarizer { txt.append("Date: " + dateFormat.format(mDate) + "\n"); txt.append("Build fingerprint: " + Build.FINGERPRINT + "\n"); txt.append("WebKit version: " + getWebKitVersionFromUserAgentString() + "\n"); - txt.append("WebKit revision: " + getWebKitRevision() + "\n"); + txt.append("WebKit revision: " + webKitRevision + "\n"); txt.append("TOTAL: " + getTotalTestCount() + "\n"); txt.append("CRASHED (among all tests): " + mCrashedTestsCount + "\n"); @@ -276,7 +275,7 @@ public class Summarizer { txt.toString().getBytes(), false); } - private void createHtmlDetails() { + private void createHtmlDetails(String webKitRevision) { StringBuilder html = new StringBuilder(); html.append(""); @@ -284,7 +283,7 @@ public class Summarizer { html.append(SCRIPT); html.append(""); - createTopSummaryTable(html); + createTopSummaryTable(webKitRevision, html); createResultsListWithDiff(html, "Unexpected failures", mUnexpectedFailures); @@ -337,17 +336,16 @@ public class Summarizer { return "unknown"; } - private void createTopSummaryTable(StringBuilder html) { + private void createTopSummaryTable(String webKitRevision, StringBuilder html) { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); html.append("

" + mTestsRelativePath + "

"); html.append("

" + "Date: " + dateFormat.format(new Date()) + "

"); html.append("

" + "Build fingerprint: " + Build.FINGERPRINT + "

"); html.append("

" + "WebKit version: " + getWebKitVersionFromUserAgentString() + "

"); - String webkitRevision = getWebKitRevision(); html.append("

" + "WebKit revision: "); - html.append("" + webkitRevision + ""); + html.append("" + webKitRevision + ""); html.append("

"); html.append(""); -- cgit v1.1