Merge lp://staging/~gz/bzr/run_test_setup_in_tempdir_140874 into lp://staging/bzr/2.5

Proposed by Martin Packman
Status: Merged
Approved by: Vincent Ladeuil
Approved revision: no longer in the source branch.
Merged at revision: 6494
Proposed branch: lp://staging/~gz/bzr/run_test_setup_in_tempdir_140874
Merge into: lp://staging/bzr/2.5
Diff against target: 81 lines (+17/-19)
2 files modified
bzrlib/tests/test_setup.py (+14/-19)
doc/en/release-notes/bzr-2.5.txt (+3/-0)
To merge this branch: bzr merge lp://staging/~gz/bzr/run_test_setup_in_tempdir_140874
Reviewer Review Type Date Requested Status
Vincent Ladeuil Needs Fixing
Review via email: mp+99518@code.staging.launchpad.net

Commit message

Run bt.test_setup in a more isolated environment

Description of the change

The smoketest for setup.py runs with the user's environment and in the current directory, which leads to issues such as the one linked and bug 955314 where running tests makes various build artefacts appear. This branch makes it use a tempdir for both build output and install location.

The downside is this then becomes the test that needs the most space on temp (you can currently get away with just 20MB or so), and I haven't got a neat way of detecting a lack of room and skipping.

To post a comment you must log in.
Revision history for this message
Vincent Ladeuil (vila) wrote :

\o/

57 + self.log('test_build running in %s' % self.source_dir)

running *from* (instead of in) now, no ?

58 + build_dir = os.path.join(self.test_dir, "build")
59 + install_dir = os.path.join(self.test_dir, "install")

That's really nit-picking, but why not osutils.joinpath ?

I won't approve this proposal without a news entry ;-p

review: Needs Fixing
Revision history for this message
Martin Packman (gz) wrote :

> 57 + self.log('test_build running in %s' % self.source_dir)
>
> running *from* (instead of in) now, no ?

Good point, changed.

> 58 + build_dir = os.path.join(self.test_dir, "build")
> 59 + install_dir = os.path.join(self.test_dir, "install")
>
> That's really nit-picking, but why not osutils.joinpath ?

Would't serve any useful purpose, adds some segment checking and forces forward slashes on windows. Being consistent would be an argument for, but only if we had a more unified approach to paths in general.

>
> I won't approve this proposal without a news entry ;-p

Added. :)

Revision history for this message
Martin Packman (gz) wrote :

sent to pqm by email

Revision history for this message
Vincent Ladeuil (vila) wrote :

> Would't serve any useful purpose, adds some segment checking

> and forces forward slashes on windows.

Which shouldn't break right ?

> Being consistent would be an argument for,

Yup, that was mainly my point.

> but
> only if we had a more unified approach to paths in general.

...but using a *single* function to join paths *is* a unification, so using
that as an argument to *not* use osutils seems to aggravate the situation
rather than improving it ;) Not a big deal.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches