-
-
Notifications
You must be signed in to change notification settings - Fork 701
Convert DUB package test into a Makefile test and run it with the proper compiler flags #6999
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -97,6 +97,7 @@ QUIET=@ | |
| export RESULTS_DIR=test_results | ||
| export MODEL | ||
| export REQUIRED_ARGS= | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. BTW, working with exported env parameters is really annoying when reading a log failure and not being able to rerun a command. |
||
| BUILD=release | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this used?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep, I had to do quite a few try to figure out a working setup and in the one you reviewed I temporarily removed the new changes with |
||
|
|
||
| ifeq ($(findstring win,$(OS)),win) | ||
| export ARGS=-inline -release -g -O | ||
|
|
@@ -112,19 +113,28 @@ export DFLAGS=-I$(DRUNTIME_PATH)\import -I$(PHOBOS_PATH) | |
| export LIB=$(PHOBOS_PATH) | ||
| else | ||
| export ARGS=-inline -release -g -O -fPIC | ||
| export DMD=../src/dmd | ||
| # hack around the fact that on auto-tester MODEL isn't set for the testsuite | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That doesn't sound right. https://github.com/braddr/at-client/blob/master/src/do_test_dmd.sh#L33-L37 There's certainly a MODEL parameter there. Generally, if things can be fixed in the AT scripts, they should be. I think Brad has generally been responsive in merging AT pull requests as long as they don't require more involved things like merging some pull requests simultaneously or manually updating test machines.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As mentioned I have bumped into this before: #6870
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes that looks wrong, osmodel.mak will already determine a default MODEL, unless one is explicity specified via |
||
| ifeq (,$(wildcard ../generated/$(OS)/$(BUILD)/64/dmd)) | ||
| REAL_MODEL=32 | ||
| else | ||
| REAL_MODEL=64 | ||
| endif | ||
| export DMD=../generated/$(OS)/$(BUILD)/$(REAL_MODEL)/dmd | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I already bumped into this before: #6870
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wait, so you want to build the Dub library with the built DMD, not the host DMD? I guess testing that the compiler can auto-bootstrap is interesting, but wouldn't it be easier and more consistent to use the host DMD? Or is that difficult because only dmd's posix.mak knows what it is?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
We should test both, but this entire issue exits because gdc's fronted is too old and has bugs.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As the goal is to check whether the dub package recipe works we should just use the host compiler and avoid additional complications. |
||
| export EXE= | ||
| export OBJ=.o | ||
| export DSEP=/ | ||
| export SEP=/ | ||
|
|
||
| DRUNTIME_PATH=../../druntime | ||
| PHOBOS_PATH=../../phobos | ||
| DUB=dub | ||
| # Default DUB flags (DUB uses a different architecture format) | ||
| DUBFLAGS=--compiler=$(abspath $(DMD)) --arch=$(subst 32,x86,$(subst 64,x86_64,$(REAL_MODEL))) | ||
| # link against shared libraries (defaults to true on supported platforms, can be overridden w/ make SHARED=0) | ||
| SHARED=$(if $(findstring $(OS),linux freebsd),1,) | ||
| DFLAGS=-I$(DRUNTIME_PATH)/import -I$(PHOBOS_PATH) -L-L$(PHOBOS_PATH)/generated/$(OS)/release/$(MODEL) | ||
| DFLAGS=-I$(abspath $(DRUNTIME_PATH))/import -I$(abspath $(PHOBOS_PATH)) -L-L$(abspath $(PHOBOS_PATH))/generated/$(OS)/release/$(MODEL) -fPIC | ||
| ifeq (1,$(SHARED)) | ||
| DFLAGS+=-defaultlib=libphobos2.so -L-rpath=$(PHOBOS_PATH)/generated/$(OS)/release/$(MODEL) | ||
| DFLAGS+=-defaultlib=libphobos2.so -L-rpath=$(abspath $(PHOBOS_PATH))/generated/$(OS)/release/$(MODEL) | ||
| endif | ||
| export DFLAGS | ||
| endif | ||
|
|
@@ -209,3 +219,5 @@ $(RESULTS_DIR)/d_do_test$(EXE): d_do_test.d $(RESULTS_DIR)/.created | |
| $(QUIET)$(DMD) -conf= $(MODEL_FLAG) -unittest -run d_do_test.d -unittest | ||
| $(QUIET)$(DMD) -conf= $(MODEL_FLAG) -od$(RESULTS_DIR) -of$(RESULTS_DIR)$(DSEP)d_do_test$(EXE) d_do_test.d | ||
|
|
||
| test_dub: | ||
| cd ./dub_package && $(DUB) test $(DUBFLAGS) --force -v | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was told by Sönke to not do this #6771 (comment).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't copy all DFLAGS otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Who doesn't copy what DFLAGS?