annotate tests/makewebstatistics.d @ 1064:f0b6549055ab

Make LDC work with LLVM trunk (s/LinkOnceLinkage/LinkOnceOdrLinkage/) Also moved the #defines for linkage types into a separate header instead of mars.h so we can #include revisions.h without having to rebuild the entire frontend every time we update. (I'm using revisions.h to get the LLVM revision for use in preprocessor conditionals. It should work with LLVM release 2.5, old trunk and new trunk)
author Frits van Bommel <fvbommel wxs.nl>
date Sun, 08 Mar 2009 16:13:10 +0100
parents 6aaa3d3c1183
children 3e98925bcc39
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
1 // Based on DSTRESS code by Thomas Kühne
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
2
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
3 module findregressions;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
4
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
5 private import std.string;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
6 private import std.conv;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
7 private import std.stdio;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
8 private import std.stream;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
9 private import std.file;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
10 private import std.c.stdlib;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
11 private import std.date;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
12 private import std.path;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
13
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
14
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
15 enum Result{
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
16 UNTESTED = 0,
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
17 PASS = 1 << 2,
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
18 XFAIL = 2 << 2,
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
19 XPASS = 3 << 2,
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
20 FAIL = 4 << 2,
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
21 ERROR = 5 << 2,
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
22 BASE_MASK = 7 << 2,
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
23
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
24 EXT_MASK = 3,
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
25 BAD_MSG = 1,
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
26 BAD_GDB = 2,
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
27
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
28 MAX = BAD_GDB + BASE_MASK
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
29 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
30
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
31 char[] toString(Result r){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
32 switch(r & Result.BASE_MASK){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
33 case Result.PASS: return "PASS";
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
34 case Result.XPASS: return "XPASS";
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
35 case Result.FAIL: return "FAIL";
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
36 case Result.XFAIL: return "XFAIL";
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
37 case Result.ERROR: return "ERROR";
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
38 case Result.UNTESTED: return "UNTESTED";
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
39 default:
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
40 break;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
41 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
42 throw new Exception(format("unhandled Result value %s", cast(int)r));
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
43 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
44
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
45 char[] dateString(){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
46 static char[] date;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
47 if(date is null){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
48 auto time = getUTCtime();
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
49 auto year = YearFromTime(time);
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
50 auto month = MonthFromTime(time);
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
51 auto day = DateFromTime(time);
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
52 date = format("%d-%02d-%02d", year, month+1, day);
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
53 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
54 return date;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
55 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
56
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
57 char[][] unique(char[][] a){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
58 char[][] b = a.sort;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
59 char[][] back;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
60
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
61 back ~= b[0];
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
62
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
63 size_t ii=0;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
64 for(size_t i=0; i<b.length; i++){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
65 if(back[ii]!=b[i]){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
66 back~=b[i];
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
67 ii++;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
68 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
69 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
70
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
71 return back;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
72 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
73
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
74 private{
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
75 version(Windows){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
76 import std.c.windows.windows;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
77 extern(Windows) BOOL GetFileTime(HANDLE hFile, LPFILETIME lpCreationTime, LPFILETIME lpLastAccessTime, LPFILETIME lpLastWriteTime);
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
78 }else version(linux){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
79 import std.c.linux.linux;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
80 version = Unix;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
81 }else version(Unix){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
82 import std.c.unix.unix;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
83 }else{
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
84 static assert(0);
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
85 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
86
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
87 alias ulong FStime;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
88
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
89 FStime getFStime(char[] fileName){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
90 version(Windows){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
91 HANDLE h;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
92
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
93 if (useWfuncs){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
94 wchar* namez = std.utf.toUTF16z(fileName);
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
95 h = CreateFileW(namez,GENERIC_WRITE,0,null,OPEN_ALWAYS,
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
96 FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN,cast(HANDLE)null);
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
97 }else{
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
98 char* namez = toMBSz(fileName);
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
99 h = CreateFileA(namez,GENERIC_WRITE,0,null,OPEN_ALWAYS,
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
100 FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN,cast(HANDLE)null);
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
101 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
102
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
103 if (h == INVALID_HANDLE_VALUE)
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
104 goto err;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
105
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
106 FILETIME creationTime;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
107 FILETIME accessTime;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
108 FILETIME writeTime;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
109
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
110 BOOL b = GetFileTime(h, &creationTime, &accessTime, &writeTime);
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
111 if(b==1){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
112 long modA = writeTime.dwLowDateTime;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
113 long modB = writeTime.dwHighDateTime;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
114 return modA | (modB << (writeTime.dwHighDateTime.sizeof*8));
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
115 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
116
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
117 err:
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
118 CloseHandle(h);
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
119 throw new Exception("failed to query file modification : "~fileName);
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
120 }else version(Unix){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
121 char* namez = toStringz(fileName);
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
122 struct_stat statbuf;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
123
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
124 if(stat(namez, &statbuf)){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
125 throw new FileException(fileName, getErrno());
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
126 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
127
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
128 return statbuf.st_mtime;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
129 }else{
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
130 static assert(0);
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
131 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
132 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
133 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
134
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
135 char[] cleanFileName(char[] file){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
136 char[] back;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
137 bool hadSep;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
138
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
139 foreach(char c; file){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
140 if(c == '/' || c == '\\'){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
141 if(!hadSep){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
142 back ~= '/';
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
143 hadSep = true;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
144 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
145 }else{
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
146 back ~= c;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
147 hadSep = false;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
148 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
149 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
150
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
151 size_t start = 0;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
152 while(back[start] <= ' ' && start < back.length){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
153 start++;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
154 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
155
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
156 size_t end = back.length-1;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
157 while(back[end] <= ' ' && end >= start){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
158 end--;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
159 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
160
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
161 back = back[start .. end+1];
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
162
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
163 return back;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
164 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
165
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
166 class Test{
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
167 char[] name;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
168 char[] file;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
169 Result r;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
170
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
171 this(char[] file){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
172 this.file = file;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
173
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
174 int start = rfind(file, "/");
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
175 if(start<0){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
176 start = 0;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
177 }else{
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
178 start += 1;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
179 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
180
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
181 int end = rfind(file, ".");
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
182 if(end < start){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
183 end = file.length;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
184 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
185
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
186 name = file[start .. end];
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
187 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
188 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
189
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
190
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
191 class Log{
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
192 Test[char[]] tests;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
193
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
194 char[] id;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
195
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
196 int[Result] counts;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
197
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
198 this(char[] id, char[] file){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
199 this.id = id;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
200 counts = [
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
201 Result.PASS: 0,
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
202 Result.FAIL: 0,
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
203 Result.XPASS: 0,
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
204 Result.XFAIL: 0,
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
205 Result.ERROR: 0 ];
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
206
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
207 writefln("parsing: %s", file);
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
208 FStime logTime = getFStime(file);
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
209 Stream source = new BufferedFile(file, FileMode.In);
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
210 while(!source.eof()){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
211 add(source.readLine());
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
212 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
213 dropBogusResults(logTime, "dstress");
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
214 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
215
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
216
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
217 void dropBogusResults(FStime recordTime, char[] testRoot){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
218 uint totalCount = tests.length;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
219
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
220 char[][] sourcesTests = tests.keys;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
221 foreach(char[] source; sourcesTests){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
222 if(find(source, "complex/") < 0){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
223 try{
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
224 FStime caseTime = getFStime(testRoot~std.path.sep~source);
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
225 if(caseTime > recordTime){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
226 debug(drop) fwritefln(stderr, "dropped: %s", source);
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
227 counts[tests[source].r & Result.BASE_MASK]--;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
228 tests.remove(source);
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
229 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
230 }catch(Exception e){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
231 debug(drop) fwritefln(stderr, "dropped: %s", source);
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
232 counts[tests[source].r & Result.BASE_MASK]--;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
233 tests.remove(source);
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
234 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
235 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
236 // asm-filter
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
237 int i = find(source, "asm_p");
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
238 if(i >= 0){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
239 counts[tests[source].r & Result.BASE_MASK]--;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
240 tests.remove(source);
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
241 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
242 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
243 tests.rehash;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
244
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
245 writefln("dropped %s outdated tests (%s remaining)", totalCount - tests.length, tests.length);
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
246 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
247
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
248
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
249 bool add(char[] line){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
250 const char[] SUB = "Torture-Sub-";
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
251 const char[] TORTURE = "Torture:";
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
252
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
253 line = strip(line);
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
254 int id = -1;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
255 Result r = Result.UNTESTED;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
256
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
257 if(line.length > SUB.length && line[0 .. SUB.length] == SUB){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
258 line = line[SUB.length .. $];
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
259 id = 0;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
260 while(line[id] >= '0' && line[id] <= '9'){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
261 id++;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
262 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
263 int start = id;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
264 id = std.conv.toUint(line[0 .. id]);
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
265
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
266 while(line[start] != '-'){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
267 start++;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
268 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
269 line = line[start+1 .. $];
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
270 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
271
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
272 char[][] token = split(line);
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
273 if(token.length < 2){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
274 return false;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
275 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
276 char[] file = strip(token[1]);
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
277
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
278 switch(token[0]){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
279 case "PASS:":
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
280 r = Result.PASS; break;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
281 case "FAIL:":
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
282 r = Result.FAIL; break;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
283 case "XPASS:":
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
284 r = Result.XPASS; break;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
285 case "XFAIL:":
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
286 r = Result.XFAIL; break;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
287 case "ERROR:":
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
288 r = Result.ERROR; break;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
289 default:{
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
290 if(token[0] == TORTURE){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
291 throw new Exception("not yet handled: "~line);
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
292 }else if(id > -1){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
293 throw new Exception(format("bug in SUB line: (%s) %s", id, line));
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
294 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
295 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
296 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
297
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
298 if(r != Result.UNTESTED){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
299 if(std.string.find(line, "bad error message") > -1){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
300 r |= Result.BAD_MSG;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
301 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
302 if(std.string.find(line, "bad debugger message") > -1){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
303 r |= Result.BAD_MSG;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
304 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
305
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
306 file = cleanFileName(file);
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
307
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
308 if(id >= 0){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
309 // update sub
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
310 id--;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
311
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
312 Test* test = file in tests;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
313
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
314 if(test is null){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
315 Test t = new Test(file);
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
316 tests[file] = t;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
317 t.r = r;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
318 counts[r & Result.BASE_MASK]++;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
319 }else{
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
320 if(test.r != Result.UNTESTED){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
321 test.r = Result.UNTESTED;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
322 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
323 test.r = r;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
324 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
325 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
326 return true;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
327 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
328 return false;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
329 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
330 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
331
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
332
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
333 char[] basedir = "web";
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
334 bool regenerate = false;
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
335
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
336 int main(char[][] args){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
337
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
338 if(args.length < 3 || (args[1] == "--regenerate" && args.length < 4)){
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
339 fwritefln(stderr, "%s [--regenerate] <reference-log> <log> <log> ...", args[0]);
663
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
340 fwritefln(stderr, "bash example: %s reference/dmd-something $(ls reference/ldc*)", args[0]);
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
341 return 1;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
342 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
343
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
344 char[] reference;
257
4234b014a4f2 [svn r275] improved makewebstatistics
ChristianK
parents: 256
diff changeset
345 char[][] files;
4234b014a4f2 [svn r275] improved makewebstatistics
ChristianK
parents: 256
diff changeset
346 if(args[1] == "--regenerate") {
4234b014a4f2 [svn r275] improved makewebstatistics
ChristianK
parents: 256
diff changeset
347 regenerate = true;
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
348 reference = args[2];
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
349 files = args[3..$] ~ reference;
257
4234b014a4f2 [svn r275] improved makewebstatistics
ChristianK
parents: 256
diff changeset
350 } else {
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
351 reference = args[1];
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
352 files = args[2..$] ~ reference;
257
4234b014a4f2 [svn r275] improved makewebstatistics
ChristianK
parents: 256
diff changeset
353 }
4234b014a4f2 [svn r275] improved makewebstatistics
ChristianK
parents: 256
diff changeset
354
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
355 // make sure base path exists
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
356 if(std.file.exists(basedir) && !std.file.isdir(basedir))
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
357 throw new Exception(basedir ~ " is not a directory!");
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
358 else if(!std.file.exists(basedir))
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
359 std.file.mkdir(basedir);
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
360
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
361
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
362 Log[char[]] logs;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
363
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
364 // emit per-log data
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
365 foreach(char[] file; files)
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
366 generateLogStatistics(file, logs);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
367
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
368 // differences between logs
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
369 foreach(int i, char[] file; files[1 .. $])
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
370 generateChangeStatistics(files[1+i], files[1+i-1], logs);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
371
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
372 // differences between reference and logs
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
373 foreach(char[] file; files[0..$-1])
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
374 generateChangeStatistics(file, reference, logs);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
375
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
376 // collect all the stats.base files into a large table
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
377 BufferedFile index = new BufferedFile(std.path.join(basedir, "index.html"), FileMode.OutNew);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
378 scope(exit) index.close();
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
379 index.writefln(`
663
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
380 <!DOCTYPE html>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
381 <html>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
382 <head>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
383 <title>DStress results for x86-32 Linux</title>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
384 <style type="text/css">
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
385 body {
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
386 font-family: Arial, Helvetica, sans-serif;
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
387 font-size: 0.8em;
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
388 }
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
389 a {
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
390 text-decoration: none;
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
391 }
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
392 a:hover {
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
393 border-bottom: 1px dotted blue;
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
394 }
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
395 table {
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
396 border-collapse: collapse;
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
397 }
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
398 tr {
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
399 border-bottom: 1px solid #CCC;
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
400 }
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
401 tr.odd {
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
402 background: #e0e0e0;
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
403 }
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
404 tr.head {
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
405 border-bottom: none;
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
406 }
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
407 td,th {
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
408 padding: 2px 10px 2px 10px;
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
409 }
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
410 .result:hover {
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
411 background: #C3DFFF;
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
412 }
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
413 .pass,.xfail,.xpass,.fail,.xpass,.error,.generic {
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
414 text-align: center;
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
415 }
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
416 .generic {
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
417 background: #EEE;
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
418 color: gray;
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
419 }
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
420 .pass {
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
421 background: #98FF90;
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
422 color: green;
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
423 }
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
424 tr:hover .pass {
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
425 background: #83E67B;
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
426 }
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
427 .xfail {
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
428 background: #BDFFB8;
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
429 color: #0CAE00;
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
430 }
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
431 tr:hover .xfail {
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
432 background: #98FF90;
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
433 }
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
434 .fail {
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
435 background: #FF6E7A;
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
436 color: maroon;
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
437 }
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
438 .xpass {
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
439 background: #FF949D;
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
440 color: maroon;
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
441 }
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
442 .error {
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
443 background: #FFB3B9;
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
444 color: maroon;
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
445 }
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
446 .borderleft {
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
447 border-left: 1px solid #CCC;
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
448 }
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
449 </style>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
450 </head>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
451
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
452 <body>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
453 <h1>DStress results for x86-32 Linux</h1>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
454
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
455 <h2>Legend</h2>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
456 <table id="legend">
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
457 <tr>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
458 <th>Color</th>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
459 <th>Description</th>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
460 </tr>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
461 <tr class="result">
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
462 <td class="pass">PASS</td>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
463 <td>Test passed and was expected to pass</td>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
464 </tr>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
465 <tr class="result">
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
466 <td class="xfail">XFAIL</td>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
467 <td>Test failed and expected to fail</td>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
468 </tr>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
469 <tr class="result">
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
470 <td class="fail">FAIL</td>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
471 <td>Test failed but was expected to pass</td>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
472 </tr>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
473 <tr class="result">
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
474 <td class="xpass">XPASS</td>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
475 <td>Test passed but was expected to fail</td>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
476 </tr>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
477 <tr class="result">
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
478 <td class="error">ERROR</td>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
479 <td>The compiler, linker or the test segfaulted</td>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
480 </tr>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
481 <tr class="result">
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
482 <td class="generic">+</td>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
483 <td>Changes from FAIL, XPASS or ERROR to PASS or XFAIL</td>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
484 </tr>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
485 <tr class="result">
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
486 <td class="generic">-</td>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
487 <td>Changes from PASS or XFAIL to FAIL, XPASS or ERROR</td>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
488 </tr>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
489 <tr class="result">
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
490 <td class="generic">chg</td>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
491 <td>Changed within the good or bad group without crossing over</td>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
492 </tr>
497
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
493 </table>
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
494
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
495 <h2>Results</h2>
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
496 <table>
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
497 <tr class="head">
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
498 <th></th>
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
499 <th colspan="5" class="borderleft">Test results</th>
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
500 <th colspan="3" class="borderleft">Diff to previous</th>
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
501 <th colspan="3" class="borderleft">Diff to ` ~ std.path.getBaseName(reference) ~ `</th>
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
502 </tr>
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
503 <tr>
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
504 <th>Name</th>
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
505 <th class="borderleft">PASS</th>
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
506 <th>XFAIL</th>
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
507 <th>FAIL</th>
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
508 <th>XPASS</th>
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
509 <th>ERROR</th>
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
510 <th class="borderleft">+</th>
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
511 <th>-</th>
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
512 <th>chg</th>
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
513 <th class="borderleft">+</th>
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
514 <th>-</th>
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
515 <th>chg</th>
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
516 </tr>
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
517 `);
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
518
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
519 for(int i = files.length - 1; i >= 0; --i) {
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
520 auto file = files[i];
497
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
521 index.writefln(`<tr class="` ~ (i%2 ? `result` : `odd result`) ~ `">`);
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
522 char[] id = std.path.getBaseName(file);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
523 char[] statsname = std.path.join(std.path.join(basedir, id), "stats.base");
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
524 index.writef(cast(char[])std.file.read(statsname));
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
525
497
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
526 if(i != 0) {
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
527 char[] newid = std.path.getBaseName(files[i-1]);
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
528 statsname = std.path.join(std.path.join(basedir, newid ~ "-to-" ~ id), "stats.base");
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
529 index.writef(cast(char[])std.file.read(statsname));
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
530 } else {
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
531 index.writefln(`<td class="borderleft"></td><td></td><td></td>`);
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
532 }
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
533
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
534 if(i != files.length - 1) {
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
535 char[] refid = std.path.getBaseName(reference);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
536 statsname = std.path.join(std.path.join(basedir, refid ~ "-to-" ~ id), "stats.base");
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
537 index.writef(cast(char[])std.file.read(statsname));
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
538 } else {
497
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
539 index.writefln(`<td class="borderleft"></td><td></td><td></td>`);
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
540 }
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
541
497
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
542 index.writefln(`</tr>`);
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
543 }
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
544
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
545 index.writefln(`</table></body></html>`);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
546
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
547 return 0;
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
548 }
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
549
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
550 void generateLogStatistics(char[] file, ref Log[char[]] logs)
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
551 {
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
552 char[] id = std.path.getBaseName(file);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
553 char[] dirname = std.path.join(basedir, id);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
554
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
555 if(std.file.exists(dirname)) {
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
556 if(std.file.isdir(dirname)) {
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
557 if(!regenerate) {
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
558 writefln("Directory ", dirname, " already exists, skipping...");
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
559 return;
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
560 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
561 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
562 else
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
563 throw new Exception(dirname ~ " is not a directory!");
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
564 }
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
565 else
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
566 std.file.mkdir(dirname);
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
567
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
568 // parse etc.
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
569 Log log = new Log(id, file);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
570 logs[id] = log;
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
571
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
572 // write status
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
573 {
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
574 BufferedFile makeFile(char[] name) {
261
5723b7385c25 [svn r279] fixed bug in makewebstatistics, regenerated output
ChristianK
parents: 257
diff changeset
575 return new BufferedFile(std.path.join(dirname, name), FileMode.OutNew);
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
576 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
577 BufferedFile[Result] resultsfile = [
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
578 Result.PASS: makeFile("pass.html"),
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
579 Result.FAIL: makeFile("fail.html"),
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
580 Result.XPASS: makeFile("xpass.html"),
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
581 Result.XFAIL: makeFile("xfail.html"),
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
582 Result.ERROR: makeFile("error.html") ];
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
583
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
584 scope(exit) {
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
585 foreach(file; resultsfile)
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
586 file.close();
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
587 }
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
588
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
589 foreach(file; resultsfile)
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
590 file.writefln(`<html><body>`);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
591
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
592 foreach(tkey; log.tests.keys.sort) {
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
593 auto test = log.tests[tkey];
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
594 auto result = test.r & Result.BASE_MASK;
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
595 resultsfile[result].writefln(test.name, " in ", test.file, "<br>");
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
596 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
597
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
598 foreach(file; resultsfile)
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
599 file.writefln(`</body></html>`);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
600 }
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
601
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
602 BufferedFile stats = new BufferedFile(std.path.join(dirname, "stats.base"), FileMode.OutNew);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
603 scope(exit) stats.close();
497
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
604 stats.writefln(`<td>`, id, `</td>`);
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
605 stats.writefln(`<td class="pass borderleft"><a href="`, std.path.join(log.id, "pass.html"), `">`, log.counts[Result.PASS], `</a></td>`);
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
606 stats.writefln(`<td class="xfail"><a href="`, std.path.join(log.id, "xfail.html"), `">`, log.counts[Result.XFAIL], `</a></td>`);
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
607 stats.writefln(`<td class="fail"><a href="`, std.path.join(log.id, "fail.html"), `">`, log.counts[Result.FAIL], `</a></td>`);
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
608 stats.writefln(`<td class="xpass"><a href="`, std.path.join(log.id, "xpass.html"), `">`, log.counts[Result.XPASS], `</a></td>`);
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
609 stats.writefln(`<td class="error"><a href="`, std.path.join(log.id, "error.html"), `">`, log.counts[Result.ERROR], `</a></td>`);
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
610 }
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
611
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
612 void generateChangeStatistics(char[] file1, char[] file2, ref Log[char[]] logs)
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
613 {
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
614 char[] newid = std.path.getBaseName(file1);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
615 char[] oldid = std.path.getBaseName(file2);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
616
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
617 char[] dirname = std.path.join(basedir, oldid ~ "-to-" ~ newid);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
618
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
619 if(std.file.exists(dirname)) {
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
620 if(std.file.isdir(dirname)) {
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
621 if(!regenerate) {
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
622 writefln("Directory ", dirname, " already exists, skipping...");
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
623 return;
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
624 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
625 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
626 else
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
627 throw new Exception(dirname ~ " is not a directory!");
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
628 }
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
629 else
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
630 std.file.mkdir(dirname);
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
631
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
632 // parse etc.
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
633 Log newLog, oldLog;
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
634 Log getOrParse(char[] id, char[] file) {
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
635 if(id in logs)
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
636 return logs[id];
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
637 else {
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
638 Log tmp = new Log(id, file);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
639 logs[id] = tmp;
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
640 return tmp;
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
641 }
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
642 }
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
643 newLog = getOrParse(newid, file1);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
644 oldLog = getOrParse(oldid, file2);
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
645
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
646 int nRegressions, nImprovements, nChanges;
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
647
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
648 {
261
5723b7385c25 [svn r279] fixed bug in makewebstatistics, regenerated output
ChristianK
parents: 257
diff changeset
649 auto regressionsFile = new BufferedFile(std.path.join(dirname, "regressions.html"), FileMode.OutNew);
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
650 scope(exit) regressionsFile.close();
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
651 regressionsFile.writefln(`<html><body>`);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
652
261
5723b7385c25 [svn r279] fixed bug in makewebstatistics, regenerated output
ChristianK
parents: 257
diff changeset
653 auto improvementsFile = new BufferedFile(std.path.join(dirname, "improvements.html"), FileMode.OutNew);
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
654 scope(exit) improvementsFile.close();
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
655 improvementsFile.writefln(`<html><body>`);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
656
261
5723b7385c25 [svn r279] fixed bug in makewebstatistics, regenerated output
ChristianK
parents: 257
diff changeset
657 auto changesFile = new BufferedFile(std.path.join(dirname, "changes.html"), FileMode.OutNew);
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
658 scope(exit) changesFile.close();
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
659 changesFile.writefln(`<html><body>`);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
660
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
661 BufferedFile targetFile;
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
662
346
c9d5c711d65a [svn r367] In web dstress statistics, write change lists sorted by filename.
ChristianK
parents: 266
diff changeset
663 foreach(file; newLog.tests.keys.sort){
c9d5c711d65a [svn r367] In web dstress statistics, write change lists sorted by filename.
ChristianK
parents: 266
diff changeset
664 Test* t = file in newLog.tests;
c9d5c711d65a [svn r367] In web dstress statistics, write change lists sorted by filename.
ChristianK
parents: 266
diff changeset
665 Test* oldT = file in oldLog.tests;
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
666
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
667 if(oldT !is null){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
668 if(oldT.r == t.r)
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
669 continue;
552
648409a7fb0c Fix findregressions and makewebstatistics to adhere to our definition of
Christian Kamm <kamm incasoftware de>
parents: 497
diff changeset
670 else if(t.r >= Result.XPASS && oldT.r && oldT.r <= Result.XFAIL){
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
671 targetFile = regressionsFile;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
672 nRegressions++;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
673 }
552
648409a7fb0c Fix findregressions and makewebstatistics to adhere to our definition of
Christian Kamm <kamm incasoftware de>
parents: 497
diff changeset
674 else if(t.r && t.r <= Result.XFAIL && oldT.r >= Result.XPASS){
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
675 targetFile = improvementsFile;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
676 nImprovements++;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
677 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
678 else {
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
679 targetFile = changesFile;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
680 nChanges++;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
681 }
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
682 targetFile.writefln(toString(oldT.r), " -> ", toString(t.r), " : ", t.name, " in ", t.file, "<br>");
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
683 }
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
684 }
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
685
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
686 regressionsFile.writefln(`</body></html>`);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
687 improvementsFile.writefln(`</body></html>`);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
688 changesFile.writefln(`</body></html>`);
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
689 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
690
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
691 BufferedFile stats = new BufferedFile(std.path.join(dirname, "stats.base"), FileMode.OutNew);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
692 scope(exit) stats.close();
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
693 auto dir = oldid ~ "-to-" ~ newid;
497
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
694 stats.writefln(`<td class="borderleft"><a href="`, std.path.join(dir, "improvements.html"), `">`, nImprovements, `</a></td>`);
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
695 stats.writefln(`<td><a href="`, std.path.join(dir, "regressions.html"), `">`, nRegressions, `</a></td>`);
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
696 stats.writefln(`<td><a href="`, std.path.join(dir, "changes.html"), `">`, nChanges, `</a></td>`);
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
697 }