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:
Vladimir Panteleev 2018-04-10 21:28:01 +00:00
parent 980a3eec38
commit a29876673a
No known key found for this signature in database
GPG key ID: 5004F0FAD051576D

View file

@ -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)