Mercurial > projects > ldc
view runalltests.d @ 95:71b8fecdae38 trunk
[svn r99] Removed the ray demo. it's in test already (and not broken there)
author | lindquist |
---|---|
date | Mon, 12 Nov 2007 06:43:33 +0100 |
parents | 0b9b286b67b6 |
children | 5071469303d4 |
line wrap: on
line source
module runalltests; import std.file; import std.path; import std.process; import std.stdio; int main(string[] args) { string[] bad; string[] badrun; chdir("test"); auto contents = listdir(".", "*.d"); foreach(c; contents) { auto cmd = "llvmdc -quiet "~c; writefln(cmd); if (system(cmd) != 0) { bad ~= c; } else if (system(getName(c)) != 0) { badrun ~= c; } } int ret = 0; if (bad.length > 0 || badrun.length > 0) { writefln(bad.length, '/', contents.length, " of the tests failed to compile:"); foreach(b; bad) { writefln(" ",b); } 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, " of the tests passed"); return ret; }