Opened at 2011-11-02T18:08:06Z
Last modified at 2011-12-14T00:10:51Z
#1576 assigned defect
support running tests for an installed version without causing allmydata.test.test_runner.BinTahoe.test_the_right_code to fail
Reported by: | davidsarah | Owned by: | davidsarah |
---|---|---|---|
Priority: | major | Milestone: | soon |
Component: | code | Version: | 1.9.0b1 |
Keywords: | test packaging | Cc: | |
Launchpad Bug: |
Description
The intended way to run tests for an OS package-manager-installed copy of Tahoe-LAFS is tahoe debug trial (which uses the installed tahoe script on the PATH).
This fails with the following error:
[FAIL] Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/allmydata/test/test_runner.py", line 119, in test_the_right_code self._check_right_code(srcfile) File "/usr/lib/pymodules/python2.7/allmydata/test/test_runner.py", line 116, in _check_right_code self.fail(msg) twisted.trial.unittest.FailTest: We seem to be testing the code at '/usr/lib/pymodules', (according to the source filename '/usr/lib/pymodules/python2.7/allmydata/__init__.pyc'), but expected to be testing the code at '/home/eutopia'. Please run the tests from the root of the Tahoe-LAFS distribution. allmydata.test.test_runner.BinTahoe.test_the_right_code
because that test doesn't know where the code is supposed to be located. It is OK for the test to be skipped in this case.
Change History (3)
comment:1 Changed at 2011-11-02T18:10:04Z by davidsarah
comment:2 Changed at 2011-11-22T23:29:15Z by davidsarah
As nejucomo points out on #tahoe-lafs, it's ugly to need to run the tests with the base of the distribution as the current directory. Perhaps there should be an explicit option to tell 'tahoe debug trial' where the code it is supposed to be testing is. (It could request to be rerun with that option if the current directory does not look like it is a Tahoe distribution.)
comment:3 Changed at 2011-12-14T00:10:51Z by davidsarah
- Milestone changed from undecided to 1.10.0
- Owner changed from somebody to davidsarah
- Status changed from new to assigned
https://bugs.launchpad.net/ubuntu/+source/pycryptopp/+bug/811721/comments/18 is an example of such a failure. (Note that the launchpad bug is otherwise unrelated.)