Merge pull request #333 from marler8997/rdmdRelativeCompilers

support relative compiler filenames in rdmd_test
merged-on-behalf-of: Vladimir Panteleev <github@thecybershadow.net>
This commit is contained in:
The Dlang Bot 2018-03-19 13:07:44 +01:00 committed by GitHub
commit 9a03b14dd9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View file

@ -99,7 +99,7 @@ clean:
$(ROOT)/tests_extractor: tests_extractor.d
mkdir -p $(ROOT)
DFLAGS="$(DFLAGS)" $(DUB) build \
--single $< --force --compiler=$(abspath $(DMD)) $(DUBFLAGS) \
--single $< --force --compiler=$(DMD) $(DUBFLAGS) \
&& mv ./tests_extractor $@
################################################################################
@ -110,7 +110,7 @@ test_tests_extractor: $(ROOT)/tests_extractor
$< -i ./test/tests_extractor/ascii.d | diff - ./test/tests_extractor/ascii.d.ext
$< -i ./test/tests_extractor/iteration.d | diff - ./test/tests_extractor/iteration.d.ext
RDMD_TEST_COMPILERS = $(abspath $(DMD))
RDMD_TEST_COMPILERS = $(DMD)
RDMD_TEST_EXECUTABLE = $(ROOT)/rdmd
RDMD_TEST_DEFAULT_COMPILER = $(basename $(DMD))

View file

@ -105,6 +105,11 @@ void main(string[] args)
// run the test suite for each specified test compiler
foreach (testCompiler; testCompilerList.split(','))
{
// if compiler is a relative filename it must be converted
// to absolute because this test changes directories
if (testCompiler.canFind!isDirSeparator || testCompiler.exists)
testCompiler = buildNormalizedPath(testCompiler.absolutePath);
runTests(rdmdApp, testCompiler, model);
if (concurrencyTest)
runConcurrencyTest(rdmdApp, testCompiler, model);