Skip to content

Allow out-of-source testsuite builds. #1152

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

Merged
merged 3 commits into from
Jun 16, 2013
Merged

Conversation

dnadlinger
Copy link
Member

Previously, "./" was prefixed to $RESULTS_DIR in several places, while $RESULTS_DIR == "test_result" was assumed in others.

This is useful for integrating the DMD test suite with the build system of other projects, e.g. LDC (via https://github.com/ldc-developers/dmd-testsuite).

@@ -75,7 +75,7 @@ else
SHELL=/bin/bash
endif
QUIET=@
export RESULTS_DIR=test_results
export RESULTS_DIR=./test_results
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this: export RESULTS_DIR=.$(DSEP)test_results

And move it below the if wi32 block just below this line and I believe that'll make it work on win32.

@braddr
Copy link
Member

braddr commented Sep 29, 2012

Thanks for doing this cleanup. Get it working on win32 and I'll merge it in.

@dnadlinger
Copy link
Member Author

Applied your suggested change – let's see how it fares on the Win32 box this time (unfortunately, I don't have a Win32 VM around for testing right now). Also submitted a DMD issue, http://d.puremagic.com/issues/show_bug.cgi?id=8736, because this isn't the first time I've hit this issue.

@braddr
Copy link
Member

braddr commented Sep 29, 2012

Grf.. ok, I'll go poke at this one on a win32 box. I hate that part of the tester, it's twitchy as hell. But all in the service of not having to maintain two test drivers.

@dnadlinger
Copy link
Member Author

Ah, the problem is of course that ${…} is only substituted by sh, not by the Windows shell. The easiest fix would be to perform the substitution in d_do_test instead, no?

@braddr
Copy link
Member

braddr commented Sep 30, 2012

There's multiple problems, and unfortunately I don't have time to drive solutions, so you're going to have to. A (potentially incomplete) list:

  1. serialization of the d_do_test compilation and test_results directory creation is broken
  2. variable expansion (as you noted)

I do like the fixes you've proposed here.. but they need to work on windows too.

@dnadlinger dnadlinger closed this Oct 22, 2012
@dnadlinger dnadlinger reopened this Jun 10, 2013
@dnadlinger
Copy link
Member Author

This is… interesting. GitHub shows commits here that are already in master. Yes, I checked the SHA-1 hashes, it's not a botched merge.

@dnadlinger
Copy link
Member Author

@braddr: You might want to review this. Seems to work on Windows now.

@dnadlinger
Copy link
Member Author

Fixed botched merge and adapted a test case that has been added in the meantime.

@dnadlinger
Copy link
Member Author

Win32 fails right now, but that's an auto tester issue (can't connect to GitHub).

@braddr
Copy link
Member

braddr commented Jun 13, 2013

Would you mind undoing the change from test_results to generated? I like fixing all the call sites and appreciate that changing it helped find them, but I don't want to break anyone who's scripted against the current output directory name.

@dnadlinger
Copy link
Member Author

I agree, but can we have the autotester run it with a different output directory name? The reason I left the change in is so that people don't accidentally commit changes relying on test_result.

@dnadlinger
Copy link
Member Author

Removed the commit.

@braddr
Copy link
Member

braddr commented Jun 13, 2013

I agree that it'd probably be a good idea for the auto-tester to force a different name to help catch regressions. I'll add that to my todo list. It ought to be trivial.

@dnadlinger
Copy link
Member Author

As trivial as specifying RESULTS_DIR=xyz on the invocation, hopefully.

@braddr
Copy link
Member

braddr commented Jun 13, 2013

yup

braddr added a commit that referenced this pull request Jun 16, 2013
Allow out-of-source testsuite builds.
@braddr braddr merged commit 22a06f8 into dlang:master Jun 16, 2013
@dnadlinger dnadlinger deleted the out-of-source branch June 16, 2013 09:09
@dnadlinger
Copy link
Member Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants