AutoTest.patch
uppbox/AutoTest/AutoTest.cpp (working copy) | ||
---|---|---|
6 | 6 |
String errors; |
7 | 7 | |
8 | 8 |
String input; |
9 |
String umk; |
|
10 |
String exe; |
|
9 | 11 | |
10 | 12 |
Vector<String> exclude; |
11 | 13 | |
... | ... | |
38 | 40 |
txt << "-R "; |
39 | 41 |
txt << ' ' << h << ' '; |
40 | 42 |
String c; |
41 |
c << GetHomeDirFile("bin/umk") << " " << nest << ' ' << name << ' ' << bm << " -" << flags;
|
|
43 |
c << umk << " " << nest << ' ' << name << ' ' << bm << " -" << flags;
|
|
42 | 44 |
if(first) |
43 | 45 |
c << 'a'; |
44 | 46 |
#ifdef PLATFORM_POSIX |
45 | 47 |
c << 's'; |
46 | 48 |
#endif |
47 |
String exe = GetHomeDirFile("autotest.tst"); |
|
48 | 49 |
c << ' ' << exe; |
49 | 50 |
Cout() << c << '\n'; |
50 | 51 |
infolog << txt; |
... | ... | |
144 | 145 |
Vector<String> build = Split((String)ini["build_test"], ';'); |
145 | 146 |
Vector<String> bm = Split((String)ini["build_method"], ';'); |
146 | 147 |
exclude = Split((String)ini["exclude"], ';'); |
148 |
String mode = ini["output_mode"]; |
|
149 |
umk = ini["umk_path"]; |
|
150 |
if (IsNull(umk)) |
|
151 |
umk = GetHomeDirFile("bin/umk"); |
|
152 |
exe = ini["exe_path"]; |
|
153 |
if (IsNull(exe)) |
|
154 |
umk = GetHomeDirFile("autotest.tst"); |
|
147 | 155 | |
148 | 156 |
Vector<bool> release; |
149 | 157 |
for(int i = 0; i < bm.GetCount(); i++) { |
... | ... | |
184 | 192 |
SetExitCode(1); |
185 | 193 |
} |
186 | 194 |
body << "TEST LOG:\n" << infolog; |
187 | ||
195 | ||
196 |
if (mode == "watchdog") { |
|
197 |
Cout() << body |
|
198 |
<< "\n@ok=" << Passed |
|
199 |
<< "\n@errors=" << (Error + Timeout) |
|
200 |
<< "\n@failures=" << (Failed + NoRun) |
|
201 |
<< "\n@skipped=" << exclude.GetCount() << "\n"; |
|
202 |
return; |
|
203 |
} |
|
204 | ||
188 | 205 |
if(IsNull(email["smtp_server"])) |
189 | 206 |
return; |
190 | 207 |