Use generated DMD binary instead of src/dmd#6870
Conversation
fe65d17 to
444dd00
Compare
test/Makefile
Outdated
| ifeq ($(findstring win,$(OS)),win) | ||
| export ARGS=-inline -release -g -O | ||
| export DMD=../src/dmd.exe | ||
| export DMD=..\generated\$(OS)\$(MODEL)\dmd.exe |
There was a problem hiding this comment.
This path should include $(BUILD) as well. It's a mistake that the current windows make files don't put the binary in the right place and this change shouldn't perpetuate the error.
444dd00 to
a89a680
Compare
|
#6873 fixes the windows makefile, currently hardcoding BUILD to release, so you can go ahead and use generated$OS$BUILD$MODEL after that one is merged. Hopefully we can change the autotester soon |
|
Hmm it seems like the auto-tester picks up @RazvanN7 @CyberShadow any ideas how to deal with this (without ugly workarounds like checking for file existence)? |
|
After reading @braddr 's scripts, I think that the problem is due to the mismatch in determining the model. While osmodel.mak uses "uname -m" to determine the model, the autotester uses the name of the machine (which in this case is linux_32_64): https://github.com/braddr/at-client/blob/master/src/setup_env.sh#L45. One solution might be to make the autotester use osmodel.mak, but I'm going to deffer this to Brad. |
| include ../src/osmodel.mak | ||
|
|
||
| export OS | ||
| BUILD=release |
There was a problem hiding this comment.
Why is this necessary? debug is a better choice for testing in general and tests for specific optimization arguments, such as -release, do so via PERMUTE_ARGS. This variable affects only the test runner, right?
There was a problem hiding this comment.
Why is this necessary?
Because you need to find the DMD binary somehow and as Makefile variable at least the user can overwrite it...
debug is a better choice for testing in general and tests for specific optimization arguments
Hehe debug is simply a different folder as of now:
#6898
This variable affects only the test runner, right?
Yes.
There was a problem hiding this comment.
Because you need to find the DMD binary somehow and as Makefile variable at least the user can overwrite it...
I mean, is there a reason for preferring release over debug? If not I think it would be better to stick with debug, even though currently there may not be much of a difference.
There was a problem hiding this comment.
I mean, is there a reason for preferring release over debug?
Hehe I agree, but release is the default and thus used by auto-tester.
a89a680 to
7334c12
Compare
|
Thanks for your pull request, @wilzbach! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. |
7334c12 to
acdfa81
Compare
acdfa81 to
dfcc6e2
Compare
|
@RazvanN7 @ZombineDev @braddr FWIWI this is finally green, but I really don't like this hack. I think this is due to the fact that we use a different https://github.com/braddr/at-client/blob/master/src/do_build_dmd.sh https://github.com/braddr/at-client/blob/master/src/do_test_dmd.sh FYI envs are as follows: So this leaves us the following options:
Ideas? Thoughts? |
29470e6 to
7dcbb7c
Compare
Okay I switched to this approach. It's the same way the auto-tester currently deals with this problem & it looks a lot cleaner to. CC @CyberShadow maybe? |
|
LGTM. Can you remove the fix for hardened systems and focus on in the other PR, so we can this more easily merged? |
|
LGTM. I like the |
7dcbb7c to
029c857
Compare
Fair point. Done. |
|
Argh so I thought this was passing already (it did before the |
bcd303d to
70976a2
Compare
auto-tester might run the testsuite with a different $(MODEL) than DMD has been compiled with. Hence we manually check which binary exists to infer the host model.
70976a2 to
6d06b93
Compare
| # 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$(DRUNTIME_PATH)/import -I$(PHOBOS_PATH) -L-L$(PHOBOS_PATH)/generated/$(OS)/$(BUILD)/$(MODEL) |
There was a problem hiding this comment.
Druntime and Phobos are built with the opposite MODEL on auto-tester
For example for 32_64: builds 32-bit DMD, but 64-but DRuntime + Phobos
CC @RazvanN7