On Wed, Feb 13, 2013 at 3:36 PM, TJ <[email protected]> wrote:
> On 13/02/13 14:18, TJ wrote:
>> On 13/02/13 13:20, Ben Noordhuis wrote:
>>> Strange, I'm not able to reproduce that.  (Unless I invoke the tests
>>> manually, of course.)
>>
>> Nice! That means I've found another out-of-tree build issue. I've already 
>> corrected all the unit tests that were assuming
>>  source directory == build directory. It looks like:
>>
>> SimpleTestCase.__init__()
>> self.tmpdir = join(dirname(self.config.root), 'tmp')
>>
>> is pointing to the source directory.
>>
>> I'll fix that up and add it to my out-of-tree-builds-auto-v4 branch.
>
> That was easy! Here's the patch. This removes the need for any changes to 
> test/common.js or others.
>
> My only concern is it is relying on the assumption that the current working 
> directory is the
> root of the build tree (which will also be root of the source tree when doing 
> in-tree builds).
>
> When run from the Makefile that isn't an issue but before I commit the patch 
> I would welcome
> some feedback.
>
>
> diff --git a/test/simple/testcfg.py b/test/simple/testcfg.py
> index bb2c4d1..5066f70 100644
> --- a/test/simple/testcfg.py
> +++ b/test/simple/testcfg.py
> @@ -46,7 +46,7 @@ class SimpleTestCase(test.TestCase):
>      self.file = file
>      self.config = config
>      self.mode = mode
> -    self.tmpdir = join(dirname(self.config.root), 'tmp')
> +    self.tmpdir = join(os.getcwd(), 'test', 'tmp')
>
>    def AfterRun(self, result):
>      # delete the whole tmp dir

I'm not convinced that's 100% safe or future-proof.  That's not to say
I know of good alternatives, just that this doesn't seem like the best
way forward.

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to