[svn r42] Disabled the extensive logging by default. Use the -vv flag to get it back.

Fiddled a bit the the testing system.
Added a very simple SDL graphics demo.
This commit is contained in:
Tomas Lindquist Olsen
2007-10-10 06:16:48 +02:00
parent 67a92f5d51
commit 52a6e71703
8 changed files with 146 additions and 66 deletions

View File

@@ -9,30 +9,34 @@ int main(string[] args) {
string[] bad;
string[] badrun;
auto contents = listdir("test", "*.d");
chdir("test");
auto contents = listdir(".", "*.d");
foreach(c; contents) {
auto cmd = "./tester.sh "~getName(c);
if (system(cmd~" ll") != 0) {
auto cmd = "llvmdc -quiet "~c;
writefln(cmd);
if (system(cmd) != 0) {
bad ~= c;
}
else if (system(cmd~" run") != 0) {
else if (system(getName(c)) != 0) {
badrun ~= c;
}
}
int ret = 0;
if (bad.length > 0 || badrun.length > 0) {
writefln(bad.length, '/', contents.length, " tests failed to compile:");
writefln(bad.length, '/', contents.length, " of the tests failed to compile:");
foreach(b; bad) {
writefln(" ",b);
}
writefln(badrun.length, '/', contents.length, " tests failed to run:");
writefln(badrun.length, '/', contents.length - bad.length, " of the compiled tests failed to run:");
foreach(b; badrun) {
writefln(" ",b);
}
ret = 1;
}
writefln(contents.length - bad.length - badrun.length, '/', contents.length, " tests passed");
writefln(contents.length - bad.length - badrun.length, '/', contents.length, " of the tests passed");
return ret;
}