annotate tests/makewebstatistics.d @ 1638:0de4525a9ed6

Apply workaround for #395 by klickverbot.
author Christian Kamm <kamm incasoftware de>
date Mon, 08 Mar 2010 20:06:08 +0100
parents 3e98925bcc39
children
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);
1127
3e98925bcc39 Fix makewebstatistics: don't try to drop a test multiple times.
Frits van Bommel <fvbommel wxs.nl>
parents: 663
diff changeset
229 continue;
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
230 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
231 }catch(Exception e){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
232 debug(drop) fwritefln(stderr, "dropped: %s", source);
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
233 counts[tests[source].r & Result.BASE_MASK]--;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
234 tests.remove(source);
1127
3e98925bcc39 Fix makewebstatistics: don't try to drop a test multiple times.
Frits van Bommel <fvbommel wxs.nl>
parents: 663
diff changeset
235 continue;
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
236 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
237 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
238 // asm-filter
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
239 int i = find(source, "asm_p");
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
240 if(i >= 0){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
241 counts[tests[source].r & Result.BASE_MASK]--;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
242 tests.remove(source);
1127
3e98925bcc39 Fix makewebstatistics: don't try to drop a test multiple times.
Frits van Bommel <fvbommel wxs.nl>
parents: 663
diff changeset
243 continue;
255
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 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
246 tests.rehash;
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 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
249 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
250
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
251
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
252 bool add(char[] line){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
253 const char[] SUB = "Torture-Sub-";
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
254 const char[] TORTURE = "Torture:";
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
256 line = strip(line);
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
257 int id = -1;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
258 Result r = Result.UNTESTED;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
259
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
260 if(line.length > SUB.length && line[0 .. SUB.length] == SUB){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
261 line = line[SUB.length .. $];
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
262 id = 0;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
263 while(line[id] >= '0' && line[id] <= '9'){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
264 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 int start = id;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
267 id = std.conv.toUint(line[0 .. id]);
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 while(line[start] != '-'){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
270 start++;
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 line = line[start+1 .. $];
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
273 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
274
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
275 char[][] token = split(line);
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
276 if(token.length < 2){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
277 return false;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
278 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
279 char[] file = strip(token[1]);
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
280
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
281 switch(token[0]){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
282 case "PASS:":
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
283 r = Result.PASS; break;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
284 case "FAIL:":
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
285 r = Result.FAIL; break;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
286 case "XPASS:":
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
287 r = Result.XPASS; break;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
288 case "XFAIL:":
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
289 r = Result.XFAIL; break;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
290 case "ERROR:":
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
291 r = Result.ERROR; break;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
292 default:{
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
293 if(token[0] == TORTURE){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
294 throw new Exception("not yet handled: "~line);
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
295 }else if(id > -1){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
296 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
297 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
298 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
299 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
300
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
301 if(r != Result.UNTESTED){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
302 if(std.string.find(line, "bad error 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 if(std.string.find(line, "bad debugger message") > -1){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
306 r |= Result.BAD_MSG;
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
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
309 file = cleanFileName(file);
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
310
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
311 if(id >= 0){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
312 // update sub
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
313 id--;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
314
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
315 Test* test = file in tests;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
316
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
317 if(test is null){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
318 Test t = new Test(file);
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
319 tests[file] = t;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
320 t.r = r;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
321 counts[r & Result.BASE_MASK]++;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
322 }else{
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
323 if(test.r != Result.UNTESTED){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
324 test.r = Result.UNTESTED;
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 test.r = r;
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 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
329 return true;
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 return false;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
332 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
333 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
334
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
335
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
336 char[] basedir = "web";
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
337 bool regenerate = false;
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
338
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
339 int main(char[][] args){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
340
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
341 if(args.length < 3 || (args[1] == "--regenerate" && args.length < 4)){
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
342 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
343 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
344 return 1;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
345 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
346
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
347 char[] reference;
257
4234b014a4f2 [svn r275] improved makewebstatistics
ChristianK
parents: 256
diff changeset
348 char[][] files;
4234b014a4f2 [svn r275] improved makewebstatistics
ChristianK
parents: 256
diff changeset
349 if(args[1] == "--regenerate") {
4234b014a4f2 [svn r275] improved makewebstatistics
ChristianK
parents: 256
diff changeset
350 regenerate = true;
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
351 reference = args[2];
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
352 files = args[3..$] ~ reference;
257
4234b014a4f2 [svn r275] improved makewebstatistics
ChristianK
parents: 256
diff changeset
353 } else {
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
354 reference = args[1];
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
355 files = args[2..$] ~ reference;
257
4234b014a4f2 [svn r275] improved makewebstatistics
ChristianK
parents: 256
diff changeset
356 }
4234b014a4f2 [svn r275] improved makewebstatistics
ChristianK
parents: 256
diff changeset
357
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
358 // make sure base path exists
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
359 if(std.file.exists(basedir) && !std.file.isdir(basedir))
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
360 throw new Exception(basedir ~ " is not a directory!");
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
361 else if(!std.file.exists(basedir))
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
362 std.file.mkdir(basedir);
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
363
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
364
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
365 Log[char[]] logs;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
366
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
367 // emit per-log data
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
368 foreach(char[] file; files)
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
369 generateLogStatistics(file, logs);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
370
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
371 // differences between logs
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
372 foreach(int i, char[] file; files[1 .. $])
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
373 generateChangeStatistics(files[1+i], files[1+i-1], logs);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
374
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
375 // differences between reference and logs
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
376 foreach(char[] file; files[0..$-1])
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
377 generateChangeStatistics(file, reference, logs);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
378
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
379 // collect all the stats.base files into a large table
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
380 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
381 scope(exit) index.close();
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
382 index.writefln(`
663
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
383 <!DOCTYPE html>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
384 <html>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
385 <head>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
386 <title>DStress results for x86-32 Linux</title>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
387 <style type="text/css">
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
388 body {
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
389 font-family: Arial, Helvetica, sans-serif;
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
390 font-size: 0.8em;
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 {
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
393 text-decoration: none;
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 a:hover {
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
396 border-bottom: 1px dotted blue;
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 table {
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
399 border-collapse: collapse;
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 {
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
402 border-bottom: 1px solid #CCC;
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.odd {
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
405 background: #e0e0e0;
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 tr.head {
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
408 border-bottom: none;
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 td,th {
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
411 padding: 2px 10px 2px 10px;
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 .result:hover {
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
414 background: #C3DFFF;
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 .pass,.xfail,.xpass,.fail,.xpass,.error,.generic {
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
417 text-align: center;
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
418 }
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
419 .generic {
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
420 background: #EEE;
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
421 color: gray;
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
422 }
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
423 .pass {
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
424 background: #98FF90;
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
425 color: green;
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 tr:hover .pass {
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
428 background: #83E67B;
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
429 }
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
430 .xfail {
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
431 background: #BDFFB8;
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
432 color: #0CAE00;
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 tr:hover .xfail {
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
435 background: #98FF90;
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
436 }
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
437 .fail {
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
438 background: #FF6E7A;
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
439 color: maroon;
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
440 }
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
441 .xpass {
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
442 background: #FF949D;
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
443 color: maroon;
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
444 }
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
445 .error {
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
446 background: #FFB3B9;
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
447 color: maroon;
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 .borderleft {
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
450 border-left: 1px solid #CCC;
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 </style>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
453 </head>
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 <body>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
456 <h1>DStress results for x86-32 Linux</h1>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
457
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
458 <h2>Legend</h2>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
459 <table id="legend">
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 <th>Color</th>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
462 <th>Description</th>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
463 </tr>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
464 <tr class="result">
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
465 <td class="pass">PASS</td>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
466 <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
467 </tr>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
468 <tr class="result">
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
469 <td class="xfail">XFAIL</td>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
470 <td>Test failed and expected to fail</td>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
471 </tr>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
472 <tr class="result">
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
473 <td class="fail">FAIL</td>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
474 <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
475 </tr>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
476 <tr class="result">
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
477 <td class="xpass">XPASS</td>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
478 <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
479 </tr>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
480 <tr class="result">
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
481 <td class="error">ERROR</td>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
482 <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
483 </tr>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
484 <tr class="result">
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
485 <td class="generic">+</td>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
486 <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
487 </tr>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
488 <tr class="result">
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
489 <td class="generic">-</td>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
490 <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
491 </tr>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
492 <tr class="result">
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
493 <td class="generic">chg</td>
6aaa3d3c1183 First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents: 552
diff changeset
494 <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
495 </tr>
497
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
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
498 <h2>Results</h2>
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
499 <table>
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
500 <tr class="head">
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
501 <th></th>
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
502 <th colspan="5" class="borderleft">Test results</th>
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
503 <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
504 <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
505 </tr>
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
506 <tr>
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
507 <th>Name</th>
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
508 <th class="borderleft">PASS</th>
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
509 <th>XFAIL</th>
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
510 <th>FAIL</th>
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
511 <th>XPASS</th>
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
512 <th>ERROR</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 <th class="borderleft">+</th>
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
517 <th>-</th>
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
518 <th>chg</th>
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
519 </tr>
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
520 `);
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
521
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
522 for(int i = files.length - 1; i >= 0; --i) {
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
523 auto file = files[i];
497
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
524 index.writefln(`<tr class="` ~ (i%2 ? `result` : `odd result`) ~ `">`);
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
525 char[] id = std.path.getBaseName(file);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
526 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
527 index.writef(cast(char[])std.file.read(statsname));
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
528
497
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
529 if(i != 0) {
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
530 char[] newid = std.path.getBaseName(files[i-1]);
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
531 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
532 index.writef(cast(char[])std.file.read(statsname));
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
533 } else {
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
534 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
535 }
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
536
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
537 if(i != files.length - 1) {
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
538 char[] refid = std.path.getBaseName(reference);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
539 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
540 index.writef(cast(char[])std.file.read(statsname));
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
541 } else {
497
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
542 index.writefln(`<td class="borderleft"></td><td></td><td></td>`);
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
497
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
545 index.writefln(`</tr>`);
266
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
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
548 index.writefln(`</table></body></html>`);
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 return 0;
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
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
553 void generateLogStatistics(char[] file, ref Log[char[]] logs)
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 char[] id = std.path.getBaseName(file);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
556 char[] dirname = std.path.join(basedir, id);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
557
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
558 if(std.file.exists(dirname)) {
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
559 if(std.file.isdir(dirname)) {
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
560 if(!regenerate) {
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
561 writefln("Directory ", dirname, " already exists, skipping...");
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
562 return;
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
563 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
564 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
565 else
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
566 throw new Exception(dirname ~ " is not a directory!");
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
567 }
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
568 else
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
569 std.file.mkdir(dirname);
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
570
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
571 // parse etc.
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
572 Log log = new Log(id, file);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
573 logs[id] = log;
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
574
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
575 // write status
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
576 {
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
577 BufferedFile makeFile(char[] name) {
261
5723b7385c25 [svn r279] fixed bug in makewebstatistics, regenerated output
ChristianK
parents: 257
diff changeset
578 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
579 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
580 BufferedFile[Result] resultsfile = [
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
581 Result.PASS: makeFile("pass.html"),
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
582 Result.FAIL: makeFile("fail.html"),
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
583 Result.XPASS: makeFile("xpass.html"),
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
584 Result.XFAIL: makeFile("xfail.html"),
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
585 Result.ERROR: makeFile("error.html") ];
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
586
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
587 scope(exit) {
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
588 foreach(file; resultsfile)
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
589 file.close();
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
590 }
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
591
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
592 foreach(file; resultsfile)
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
593 file.writefln(`<html><body>`);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
594
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
595 foreach(tkey; log.tests.keys.sort) {
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
596 auto test = log.tests[tkey];
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
597 auto result = test.r & Result.BASE_MASK;
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
598 resultsfile[result].writefln(test.name, " in ", test.file, "<br>");
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
599 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
600
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
601 foreach(file; resultsfile)
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
602 file.writefln(`</body></html>`);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
603 }
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
604
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
605 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
606 scope(exit) stats.close();
497
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
607 stats.writefln(`<td>`, id, `</td>`);
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
608 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
609 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
610 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
611 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
612 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
613 }
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
614
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
615 void generateChangeStatistics(char[] file1, char[] file2, ref Log[char[]] logs)
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[] newid = std.path.getBaseName(file1);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
618 char[] oldid = std.path.getBaseName(file2);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
619
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
620 char[] dirname = std.path.join(basedir, oldid ~ "-to-" ~ newid);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
621
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
622 if(std.file.exists(dirname)) {
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
623 if(std.file.isdir(dirname)) {
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
624 if(!regenerate) {
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
625 writefln("Directory ", dirname, " already exists, skipping...");
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
626 return;
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
627 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
628 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
629 else
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
630 throw new Exception(dirname ~ " is not a directory!");
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
631 }
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
632 else
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
633 std.file.mkdir(dirname);
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
634
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
635 // parse etc.
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
636 Log newLog, oldLog;
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
637 Log getOrParse(char[] id, char[] file) {
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
638 if(id in logs)
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
639 return logs[id];
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
640 else {
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
641 Log tmp = new Log(id, file);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
642 logs[id] = tmp;
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
643 return tmp;
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
644 }
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
645 }
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
646 newLog = getOrParse(newid, file1);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
647 oldLog = getOrParse(oldid, file2);
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
648
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
649 int nRegressions, nImprovements, nChanges;
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
650
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
651 {
261
5723b7385c25 [svn r279] fixed bug in makewebstatistics, regenerated output
ChristianK
parents: 257
diff changeset
652 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
653 scope(exit) regressionsFile.close();
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
654 regressionsFile.writefln(`<html><body>`);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
655
261
5723b7385c25 [svn r279] fixed bug in makewebstatistics, regenerated output
ChristianK
parents: 257
diff changeset
656 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
657 scope(exit) improvementsFile.close();
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
658 improvementsFile.writefln(`<html><body>`);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
659
261
5723b7385c25 [svn r279] fixed bug in makewebstatistics, regenerated output
ChristianK
parents: 257
diff changeset
660 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
661 scope(exit) changesFile.close();
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
662 changesFile.writefln(`<html><body>`);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
663
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
664 BufferedFile targetFile;
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
665
346
c9d5c711d65a [svn r367] In web dstress statistics, write change lists sorted by filename.
ChristianK
parents: 266
diff changeset
666 foreach(file; newLog.tests.keys.sort){
c9d5c711d65a [svn r367] In web dstress statistics, write change lists sorted by filename.
ChristianK
parents: 266
diff changeset
667 Test* t = file in newLog.tests;
c9d5c711d65a [svn r367] In web dstress statistics, write change lists sorted by filename.
ChristianK
parents: 266
diff changeset
668 Test* oldT = file in oldLog.tests;
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
669
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
670 if(oldT !is null){
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
671 if(oldT.r == t.r)
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
672 continue;
552
648409a7fb0c Fix findregressions and makewebstatistics to adhere to our definition of
Christian Kamm <kamm incasoftware de>
parents: 497
diff changeset
673 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
674 targetFile = regressionsFile;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
675 nRegressions++;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
676 }
552
648409a7fb0c Fix findregressions and makewebstatistics to adhere to our definition of
Christian Kamm <kamm incasoftware de>
parents: 497
diff changeset
677 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
678 targetFile = improvementsFile;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
679 nImprovements++;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
680 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
681 else {
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
682 targetFile = changesFile;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
683 nChanges++;
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
684 }
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
685 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
686 }
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
687 }
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
688
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
689 regressionsFile.writefln(`</body></html>`);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
690 improvementsFile.writefln(`</body></html>`);
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
691 changesFile.writefln(`</body></html>`);
255
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
692 }
4d14a1c84be7 [svn r272] some rough html statistics for the tests
ChristianK
parents:
diff changeset
693
266
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
694 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
695 scope(exit) stats.close();
5d2f4814bb2e [svn r287] update to test statistics generation
ChristianK
parents: 261
diff changeset
696 auto dir = oldid ~ "-to-" ~ newid;
497
70faa6af1357 Change web statistics layout, thanks anders!
Christian Kamm <kamm incasoftware de>
parents: 362
diff changeset
697 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
698 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
699 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
700 }