Mercurial > projects > ldc
comparison tests/runminitest.d @ 418:94c4e090c1af
clean out obj dir before running mini test.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Mon, 28 Jul 2008 07:25:13 +0200 |
parents | 76bf1eaaf4dc |
children | ea991021a56a |
comparison
equal
deleted
inserted
replaced
417:d3689b183f45 | 418:94c4e090c1af |
---|---|
20 string[] nocompilefailed; | 20 string[] nocompilefailed; |
21 string[] runfailed; | 21 string[] runfailed; |
22 string[] norunfailed; | 22 string[] norunfailed; |
23 | 23 |
24 chdir("mini"); | 24 chdir("mini"); |
25 if(!exists("obj")) | 25 |
26 if (!exists("obj")) | |
26 mkdir("obj"); | 27 mkdir("obj"); |
28 | |
29 foreach(f; listdir("./obj", "*")) | |
30 { | |
31 std.file.remove(f); | |
32 } | |
27 | 33 |
28 static int classify(char[] name) | 34 static int classify(char[] name) |
29 { | 35 { |
30 if (find(name, "compile_") == 0) | 36 if (find(name, "compile_") == 0) |
31 return COMPILE; | 37 return COMPILE; |
40 | 46 |
41 auto contents = listdir(".", "*.d"); | 47 auto contents = listdir(".", "*.d"); |
42 foreach(c; contents) { | 48 foreach(c; contents) { |
43 auto testname = getName(getBaseName(c)); | 49 auto testname = getName(getBaseName(c)); |
44 writefln("TEST NAME: ", testname); | 50 writefln("TEST NAME: ", testname); |
51 | |
45 string cmd = format("llvmdc %s -quiet -ofobj/%s -odobj", c, testname); | 52 string cmd = format("llvmdc %s -quiet -ofobj/%s -odobj", c, testname); |
46 foreach(v; args[1..$]) { | 53 foreach(v; args[1..$]) { |
47 cmd ~= ' '; | 54 cmd ~= ' '; |
48 cmd ~= v; | 55 cmd ~= v; |
49 } | 56 } |