Skip to content

Commit a00faa0

Browse files
committed
Use CLI flags instead of environment variables for dspec_tester.d
1 parent d3350a9 commit a00faa0

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

dspec_tester.d

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ struct Config {
2424
string dmdBinPath = "dmd";
2525
bool printLineNumbers; // whether line numbers should be shown on errors
2626
}
27-
Config config;
27+
__gshared Config config;
2828

2929
// a range until the next ')', nested () are ignored
3030
auto untilClosingParentheses(R)(R rs)
@@ -94,12 +94,13 @@ int main(string[] args)
9494
import std.typecons : Tuple;
9595

9696
auto specDir = __FILE_FULL_PATH__.dirName.buildPath("spec");
97-
config.dmdBinPath = environment.get("DMD", "dmd");
9897
bool hasFailed;
9998

99+
config.dmdBinPath = environment.get("DMD", "dmd");
100100
auto helpInformation = getopt(
101101
args,
102102
"l|lines", "Show the line numbers on errors", &config.printLineNumbers,
103+
"compiler", "D compiler to use", &config.dmdBinPath,
103104
);
104105

105106
if (helpInformation.helpWanted)

posix.mak

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -868,10 +868,9 @@ $(PHOBOS_LATEST_FILES_GENERATED): $(PHOBOS_LATEST_DIR_GENERATED)/%: $(PHOBOS_LAT
868868
# Style tests
869869
################################################################################
870870

871-
test_dspec: dspec_tester.d $(STABLE_DMD)
872-
# Temporarily allows failures, see https://github.com/dlang/dlang.org/pull/2006
871+
test_dspec: dspec_tester.d $(DMD)
873872
@echo "Test the D Language specification"
874-
-DMD=$(DMD_LATEST) $(STABLE_RDMD) $<
873+
$(DMD) -run $< --compiler=$(DMD)
875874

876875
test: $(ASSERT_WRITELN_BIN)_test test_dspec test/next_version.sh all
877876
@echo "Searching for trailing whitespace"

0 commit comments

Comments
 (0)