mirror of
https://github.com/dlang/tools.git
synced 2025-04-28 14:10:32 +03:00
rdmd_test: Don't attempt to run Makefile test when Make is too old
Allows running most of the rdmd test suite even on systems with old GNU Make, such as Travis CI.
This commit is contained in:
parent
980a3eec38
commit
a29876673a
1 changed files with 23 additions and 14 deletions
|
@ -618,6 +618,14 @@ void runTests(string rdmdApp, string compiler, string model)
|
|||
}
|
||||
|
||||
version (Posix)
|
||||
{
|
||||
import std.conv : to;
|
||||
auto makeVersion = execute(["make", "--version"]).output.splitLines()[0];
|
||||
if (!makeVersion.skipOver("GNU Make "))
|
||||
stderr.writeln("rdmd_test: Can't detect Make version or not GNU Make, skipping Make SHELL/SHELLFLAGS test");
|
||||
else if (makeVersion.split(".").map!(to!int).array < [3, 82])
|
||||
stderr.writefln("rdmd_test: Make version (%s) is too old, skipping Make SHELL/SHELLFLAGS test", makeVersion);
|
||||
else
|
||||
{
|
||||
import std.format : format;
|
||||
|
||||
|
@ -640,6 +648,7 @@ SHELL = %s
|
|||
enforce(res.status == 0, res.output);
|
||||
enforce(std.file.read(textOutput) == "hello world\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void runConcurrencyTest(string rdmdApp, string compiler, string model)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue