mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-12 02:43:14 +01:00
Split up declaration, constant initializer gen and definition for globals, structs, classes and functions. Improved ClassInfo support (not complete), not in vtable yet. Fixed a bunch of forward reference problems. Much more. Major commit! :)
46 lines
1.1 KiB
D
46 lines
1.1 KiB
D
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) {
|
|
string cmd = "llvmdc -quiet "~c;
|
|
foreach(v; args[1..$]) {
|
|
cmd ~= ' ';
|
|
cmd ~= v;
|
|
}
|
|
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;
|
|
}
|