From 3e064bdb19fd933432246079f27f3b6a35a15151 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Tue, 12 Aug 2008 18:33:34 +0200 Subject: [PATCH] Change web statistics layout, thanks anders! --- tests/makewebstatistics.d | 218 +++++++++++++++++++++++++++----------- 1 file changed, 157 insertions(+), 61 deletions(-) diff --git a/tests/makewebstatistics.d b/tests/makewebstatistics.d index 43460d81..3f765815 100644 --- a/tests/makewebstatistics.d +++ b/tests/makewebstatistics.d @@ -377,73 +377,169 @@ int main(char[][] args){ BufferedFile index = new BufferedFile(std.path.join(basedir, "index.html"), FileMode.OutNew); scope(exit) index.close(); index.writefln(` - -

DStress results for x86-32 Linux.

-

- In short, results are defined as follows -

- while the differences between tests are grouped into - -

-

- - - - - - - - - - - - - - - - - - - + + + + DStress results for x86-32 Linux + + + + +

DStress results for x86-32 Linux

+ +

Legend

+
namePASSXFAILFAILXPASSERRORcomparison to ` ~ std.path.getBaseName(reference) ~ `
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ColorDescription
PASSTest passed and was expected to pass
XFAILTest failed and expected to fail
FAILTest failed but was expected to pass
XPASSTest passed but was expected to fail
ERRORThe compiler, linker or the test segfaulted
+Changes from FAIL, XPASS or ERROR to PASS or XFAIL
-Changes from PASS or XFAIL to FAIL, XPASS or ERROR
chgChanged within the good or bad group without crossing over
+ +

Results

+ + + + + + + + + + + + + + + + + + + + + `); for(int i = files.length - 1; i >= 0; --i) { auto file = files[i]; - index.writefln(``); + index.writefln(``); char[] id = std.path.getBaseName(file); char[] statsname = std.path.join(std.path.join(basedir, id), "stats.base"); index.writef(cast(char[])std.file.read(statsname)); + if(i != 0) { + char[] newid = std.path.getBaseName(files[i-1]); + statsname = std.path.join(std.path.join(basedir, newid ~ "-to-" ~ id), "stats.base"); + index.writef(cast(char[])std.file.read(statsname)); + } else { + index.writefln(``); + } + if(i != files.length - 1) { - index.writefln(``); } else { - index.writefln(``); + index.writefln(``); } - if(i == 0) { - continue; - } - - index.writefln(``); - index.writefln(``); + index.writefln(``); } index.writefln(`
Test resultsDiff to previousDiff to ` ~ std.path.getBaseName(reference) ~ `
NamePASSXFAILFAILXPASSERROR+-chg+-chg
`); char[] refid = std.path.getBaseName(reference); statsname = std.path.join(std.path.join(basedir, refid ~ "-to-" ~ id), "stats.base"); index.writef(cast(char[])std.file.read(statsname)); - index.writefln(`
`); - char[] newid = std.path.getBaseName(files[i-1]); - statsname = std.path.join(std.path.join(basedir, newid ~ "-to-" ~ id), "stats.base"); - index.writef(cast(char[])std.file.read(statsname)); - index.writefln(`
`); @@ -505,12 +601,12 @@ void generateLogStatistics(char[] file, ref Log[char[]] logs) BufferedFile stats = new BufferedFile(std.path.join(dirname, "stats.base"), FileMode.OutNew); scope(exit) stats.close(); - stats.writefln(``, id, ``); - stats.writefln(``, log.counts[Result.PASS], ``); - stats.writefln(``, log.counts[Result.XFAIL], ``); - stats.writefln(``, log.counts[Result.FAIL], ``); - stats.writefln(``, log.counts[Result.XPASS], ``); - stats.writefln(``, log.counts[Result.ERROR], ``); + stats.writefln(``, id, ``); + stats.writefln(``, log.counts[Result.PASS], ``); + stats.writefln(``, log.counts[Result.XFAIL], ``); + stats.writefln(``, log.counts[Result.FAIL], ``); + stats.writefln(``, log.counts[Result.XPASS], ``); + stats.writefln(``, log.counts[Result.ERROR], ``); } void generateChangeStatistics(char[] file1, char[] file2, ref Log[char[]] logs) @@ -595,7 +691,7 @@ void generateChangeStatistics(char[] file1, char[] file2, ref Log[char[]] logs) BufferedFile stats = new BufferedFile(std.path.join(dirname, "stats.base"), FileMode.OutNew); scope(exit) stats.close(); auto dir = oldid ~ "-to-" ~ newid; - stats.writefln(`Improvements: `, nImprovements, `, `); - stats.writefln(`Regressions: `, nRegressions, `, `); - stats.writefln(`Changes: `, nChanges, ``); + stats.writefln(``, nImprovements, ``); + stats.writefln(``, nRegressions, ``); + stats.writefln(``, nChanges, ``); }