Mercurial > projects > ldc
view runalltests.d @ 13:3d1d98329fa7 trunk
[svn r17] changed the llvmdc.conf to use dmd.conf style values. hardcoding my home dir is obviously not the best idea...
author | lindquist |
---|---|
date | Tue, 02 Oct 2007 21:28:57 +0200 |
parents | ee302fe07296 |
children | 0e86428ee567 |
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; auto contents = listdir("test", "*.d"); foreach(c; contents) { auto cmd = "./tester.sh "~getName(c); if (system(cmd~" ll") != 0) { bad ~= c; } else if (system(cmd~" run") != 0) { badrun ~= c; } } int ret = 0; if (bad.length > 0) { writefln(bad.length, '/', contents.length, " tests failed to compile:"); foreach(b; bad) { writefln(" ",b); } writefln(badrun.length, '/', contents.length, " tests failed to run:"); foreach(b; badrun) { writefln(" ",b); } ret = 1; } writefln(contents.length - bad.length - badrun.length, '/', contents.length, " tests passed"); return ret; }