From e7ba8524c09332808985f47474442bad28ee8262 Mon Sep 17 00:00:00 2001 From: Joseph Rushton Wakeling Date: Thu, 22 Mar 2018 22:09:43 +0100 Subject: [PATCH] rdmd_test: simplify flag for specifying default compiler Since it seems there are some use-cases where it is unavoidable to run `rdmd_test` directly, it's nice if we can reduce the amount of typing required to do so. Besides the rdmd executable itself, the only other obligatory argument to the test suite is the default compiler expected to be used by rdmd. This patch shortens the long option to `--default-compiler` and allows an equivalent single-character `-D` option, so that usage can now be of the form: rdmd_test -D The posix.mak and win32.mak makefiles have been updated accordingly. --- posix.mak | 2 +- rdmd_test.d | 2 +- win32.mak | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/posix.mak b/posix.mak index 034e1e03c4..aef972de57 100644 --- a/posix.mak +++ b/posix.mak @@ -121,7 +121,7 @@ endif test_rdmd: $(ROOT)/rdmd_test $(RDMD_TEST_EXECUTABLE) $< $(RDMD_TEST_EXECUTABLE) -m$(MODEL) \ - --rdmd-default-compiler=$(RDMD_TEST_DEFAULT_COMPILER) \ + --default-compiler=$(RDMD_TEST_DEFAULT_COMPILER) \ --test-compilers=$(RDMD_TEST_COMPILERS) \ $(VERBOSE_RDMD_TEST_FLAGS) $(DMD) $(DFLAGS) -unittest -main -run rdmd.d diff --git a/rdmd_test.d b/rdmd_test.d index c19d430921..982cf6e170 100755 --- a/rdmd_test.d +++ b/rdmd_test.d @@ -55,7 +55,7 @@ int main(string[] args) string testCompilerList; // e.g. "ldmd2,gdmd" (comma-separated list of compiler names) auto helpInfo = getopt(args, - "rdmd-default-compiler", "[REQUIRED] default D compiler used by rdmd executable", &defaultCompiler, + "D|default-compiler", "[REQUIRED] default D compiler used by rdmd executable", &defaultCompiler, "concurrency", "whether to perform the concurrency test cases", &concurrencyTest, "m|model", "architecture to run the tests for [32 or 64]", &model, "test-compilers", "comma-separated list of D compilers to test with rdmd", &testCompilerList, diff --git a/win32.mak b/win32.mak index 7efb41c931..58531182f2 100644 --- a/win32.mak +++ b/win32.mak @@ -102,7 +102,7 @@ $(ROOT)\rdmd_test.exe : rdmd_test.d test_rdmd : $(ROOT)\rdmd_test.exe $(RDMD_TEST_EXECUTABLE) $(ROOT)\rdmd_test.exe \ $(RDMD_TEST_EXECUTABLE) -m$(MODEL) -v \ - --rdmd-default-compiler=$(RDMD_TEST_DEFAULT_COMPILER) \ + --default-compiler=$(RDMD_TEST_DEFAULT_COMPILER) \ --test-compilers=$(RDMD_TEST_COMPILERS) test : test_rdmd