Skip to content

Commit e7ba852

Browse files
committed
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 <default-compiler> <path-to-rdmd-executable> The posix.mak and win32.mak makefiles have been updated accordingly.
1 parent cf1124a commit e7ba852

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

posix.mak

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ endif
121121

122122
test_rdmd: $(ROOT)/rdmd_test $(RDMD_TEST_EXECUTABLE)
123123
$< $(RDMD_TEST_EXECUTABLE) -m$(MODEL) \
124-
--rdmd-default-compiler=$(RDMD_TEST_DEFAULT_COMPILER) \
124+
--default-compiler=$(RDMD_TEST_DEFAULT_COMPILER) \
125125
--test-compilers=$(RDMD_TEST_COMPILERS) \
126126
$(VERBOSE_RDMD_TEST_FLAGS)
127127
$(DMD) $(DFLAGS) -unittest -main -run rdmd.d

rdmd_test.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ int main(string[] args)
5555
string testCompilerList; // e.g. "ldmd2,gdmd" (comma-separated list of compiler names)
5656

5757
auto helpInfo = getopt(args,
58-
"rdmd-default-compiler", "[REQUIRED] default D compiler used by rdmd executable", &defaultCompiler,
58+
"D|default-compiler", "[REQUIRED] default D compiler used by rdmd executable", &defaultCompiler,
5959
"concurrency", "whether to perform the concurrency test cases", &concurrencyTest,
6060
"m|model", "architecture to run the tests for [32 or 64]", &model,
6161
"test-compilers", "comma-separated list of D compilers to test with rdmd", &testCompilerList,

win32.mak

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ $(ROOT)\rdmd_test.exe : rdmd_test.d
102102
test_rdmd : $(ROOT)\rdmd_test.exe $(RDMD_TEST_EXECUTABLE)
103103
$(ROOT)\rdmd_test.exe \
104104
$(RDMD_TEST_EXECUTABLE) -m$(MODEL) -v \
105-
--rdmd-default-compiler=$(RDMD_TEST_DEFAULT_COMPILER) \
105+
--default-compiler=$(RDMD_TEST_DEFAULT_COMPILER) \
106106
--test-compilers=$(RDMD_TEST_COMPILERS)
107107

108108
test : test_rdmd

0 commit comments

Comments
 (0)