support running tests for an installed version without causing allmydata.test.test_runner.BinTahoe.test_the_right_code to fail #1576

Open
opened 2011-11-02 18:08:06 +00:00 by davidsarah · 2 comments
davidsarah commented 2011-11-02 18:08:06 +00:00
Owner

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.

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.
tahoe-lafs added the
code
major
defect
1.9.0b1
labels 2011-11-02 18:08:06 +00:00
tahoe-lafs added this to the undecided milestone 2011-11-02 18:08:06 +00:00
davidsarah commented 2011-11-02 18:10:04 +00:00
Author
Owner

(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.)

(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.)
davidsarah commented 2011-11-22 23:29:15 +00:00
Author
Owner

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.)

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.)
tahoe-lafs modified the milestone from undecided to 1.10.0 2011-12-14 00:10:51 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: tahoe-lafs/trac-2024-07-25#1576
No description provided.