Skip to content

Commit

Permalink
Simplify rdmd_test flag for specifying default compiler
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
WebDrake committed Mar 22, 2018
1 parent cf1124a commit 213d4fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion posix.mak
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion rdmd_test.d
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 213d4fd

Please sign in to comment.