Merge lp:~frankban/launchpad/bug-1010251 into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | Francesco Banconi on 2012-06-11 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 15392 |
| Proposed branch: | lp:~frankban/launchpad/bug-1010251 |
| Merge into: | lp:launchpad |
| Diff against target: |
44 lines (+11/-7) 1 file modified
buildout-templates/bin/test.in (+11/-7) |
| To merge this branch: | bzr merge lp:~frankban/launchpad/bug-1010251 |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Benji York (community) | code | 2012-06-11 | Approve on 2012-06-11 |
|
Review via email:
|
|||
Commit Message
Updated bin/test to change working dir before importing from site. Fixed bug 1010251.
Description of the Change
= Summary =
test_archive_
I was able to reproduce the bug only running the test in isolation inside an ephemeral, e.g.::
sudo lxc-start-ephemeral -u frankban -o lp -- "xvfb-run --error-
The css path used by the docutils html writer in this case is relative to $PWD, not relative to the branch root.
Indeed I was able to reproduce the problem without ephemerals too, calling bin/test from a different working dir (e.g. my home dir).
I've seen that, when run in isolation, the test uses the writer indirectly instantiated by `import site` inside bin/test BEFORE the script itself changes the working dir. Vice versa, when runned normally, the test is usually run in a subprocess, so the docutils writer is re-initialized with the correct working dir.
== Proposed fix ==
In bin/test, change CWD before `import site`.
== Implementation details ==
See Proposed fix.
== Tests ==
cd
launchpad/
NO QA
== lint ==
Linting changed files:
buildout-

Looks good.