[tahoe-dev] [tahoe-lafs] #145: "make test" tests the installed version of allmydata, not the local sandbox version of allmydata

tahoe-lafs trac at tahoe-lafs.org
Thu Jul 29 05:29:07 UTC 2010


#145: "make test" tests the installed version of allmydata, not the local sandbox
version of allmydata
---------------------------+------------------------------------------------
     Reporter:  zooko      |       Owner:  zooko      
         Type:  defect     |      Status:  reopened   
     Priority:  major      |   Milestone:  soon       
    Component:  packaging  |     Version:  0.6.1      
   Resolution:             |    Keywords:  test-needed
Launchpad Bug:             |  
---------------------------+------------------------------------------------

Comment (by zooko):

 Hm, let's list the supported ways to run tests:

 1. {{{cd $SOURCEDIR && python setup.py test}}}
 2. {{{cd $SOURCEDIR && trial allmydata.test}}}
 3. {{{mkdir tempempty && cd tempempty && trial allmydata.test}}} # should
 run unit tests of the installed source code, might skip some tests --
 test_runner -- that depend on the test code figuring our where the 'tahoe'
 executable lives
 4. {{{mkdir -p egginstalldir && PYTHONPATH=egginstalldir:${PYTHONPATH}
 easy_install -d egginstalldir dist/*.egg && cd egginstalldir &&
 PYTHONPATH=.:${PYTHONPATH} trial allmydata.test}}} # should run unit tests
 of the code in this egginstalldir including test_runner. This is what
 install-to-egg and test-from-egg on the buildbot is trying to do.
 5. {{{python setup.py install --single-version-externally-managed
 --record=/dev/null --prefix=prefixinstalldir && cd prefixinstalldir &&
 PYTHONPATH=lib/python2.6/site-packages:${PYTHONPATH} PATH=bin:${PATH}
 trial allmydata.test}}} # should run unit tests of the code in this
 prefixinstalldir including test_runner. This is what install-to-prefixdir
 and test-from-prefixdir on the buildbot is trying to do

 Is that it?

 Note: I just tried each of these manually and here are my results:
 1. works
 2. ''does not work''; It runs the unit tests of the installed version in
 {{{/Library/Python/2.6/site-packages/allmydata_tahoe-1.7.1-py2.6.egg}}}
 instead of the current source tree, even if I set the {{{PYTHONPATH}}}
 before running trial.
 3. works
 4. works
 5. ''does not work''; It runs the unit tests of the installed version in
 {{{/Library/Python/2.6/site-packages/allmydata_tahoe-1.7.1-py2.6.egg}}}
 instead of the current source tree, even if I set the {{{PYTHONPATH}}}
 before running trial.

-- 
Ticket URL: <http://tahoe-lafs.org/trac/tahoe-lafs/ticket/145#comment:26>
tahoe-lafs <http://tahoe-lafs.org>
secure decentralized storage


More information about the tahoe-dev mailing list