mirror of
https://github.com/dlang/tools.git
synced 2025-05-02 16:10:50 +03:00
Merge pull request #175 from CyberShadow/pull-20150911-145139
fix Issue 15031 - rdmd should force rebuild when --compiler changes
This commit is contained in:
commit
44e843e8bd
2 changed files with 17 additions and 0 deletions
1
rdmd.d
1
rdmd.d
|
@ -392,6 +392,7 @@ private string getWorkPath(in string root, in string[] compilerFlags)
|
||||||
|
|
||||||
MD5 context;
|
MD5 context;
|
||||||
context.start();
|
context.start();
|
||||||
|
context.put(compiler.representation);
|
||||||
context.put(root.absolutePath().representation);
|
context.put(root.absolutePath().representation);
|
||||||
foreach (flag; compilerFlags)
|
foreach (flag; compilerFlags)
|
||||||
{
|
{
|
||||||
|
|
16
rdmd_test.d
16
rdmd_test.d
|
@ -321,6 +321,22 @@ void runTests()
|
||||||
mkdir(conflictDir);
|
mkdir(conflictDir);
|
||||||
res = execute([rdmdApp, compilerSwitch, "-of" ~ conflictDir, forceSrc]);
|
res = execute([rdmdApp, compilerSwitch, "-of" ~ conflictDir, forceSrc]);
|
||||||
assert(res.status != 0, "-of set to a directory should fail");
|
assert(res.status != 0, "-of set to a directory should fail");
|
||||||
|
|
||||||
|
/* rdmd should force rebuild when --compiler changes: https://issues.dlang.org/show_bug.cgi?id=15031 */
|
||||||
|
|
||||||
|
res = execute([rdmdApp, compilerSwitch, forceSrc]);
|
||||||
|
assert(res.status == 0, res.output);
|
||||||
|
assert(!res.output.canFind("compile_force_src"));
|
||||||
|
|
||||||
|
auto fullCompilerPath = environment["PATH"]
|
||||||
|
.splitter(pathSeparator)
|
||||||
|
.map!(dir => dir.buildPath(compiler ~ binExt))
|
||||||
|
.filter!exists
|
||||||
|
.front;
|
||||||
|
|
||||||
|
res = execute([rdmdApp, "--compiler=" ~ fullCompilerPath, forceSrc]);
|
||||||
|
assert(res.status == 0, res.output ~ "\nCan't run with --compiler=" ~ fullCompilerPath);
|
||||||
|
assert(res.output.canFind("compile_force_src"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void runConcurrencyTest()
|
void runConcurrencyTest()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue