Skip to content

Commit 213d4fd

Browse files
committed
Simplify rdmd_test 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>
1 parent cf1124a commit 213d4fd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
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,

0 commit comments

Comments
 (0)