#434 closed defect (fixed)

automate testing of installation

Reported by: zooko Owned by: cgalvan
Priority: major Milestone: 1.4.1
Component: packaging Version: 1.0.0
Keywords: Cc:
Launchpad Bug:


Configure the tahoe master.cfg to test installation of Tahoe. I want to make sure that the following work:

  • mkdir -p ${INSTALLDIR}/lib/python${PYMAJ}.${PYMIN}/site-packages && PYTHONPATH=${PYTHONPATH}:${INSTALLDIR}/lib/python${PYMAJ}.${PYMIN}/site-packages ./setup.py install --prefix=${INSTALLDIR}
  • mkdir -p ${INSTALLDIR}/lib/python${PYMAJ}.${PYMIN}/site-packages && PYTHONPATH=${PYTHONPATH}:${INSTALLDIR}/lib/python${PYMAJ}.${PYMIN}/site-packages ./setup.py install --prefix=${INSTALLDIR} --single-version-externally-manged --record=/dev/null
  • mkdir -p ${INSTALLDIR}/lib/python${PYMAJ}.${PYMIN}/site-packages && PYTHONPATH=${PYTHONPATH}:${INSTALLDIR}/lib/python${PYMAJ}.${PYMIN}/site-packages easy_install --install-dir=${INSTALLDIR} ${SOURCE_TARBALL}
  • make install
  • make install PREFIX=${INSTALLDIR}

Note that at least two of these are currently broken on at least some of our support platforms, so my desire to get these automatically tested is not an idle desire.

Change History (12)

comment:1 Changed at 2008-06-02T19:30:10Z by zooko

Here is the code from the Twisted master.cfg which they use to test installation. (Thanks to Radix.)

class TwistedEasyInstallFactory(TwistedBaseFactory):
    treeStableTimer = 5*60

    def __init__(self, source, uncleanWarnings, python="python",
                 reactor="epoll", easy_install="easy_install"):
        TwistedBaseFactory.__init__(self, source, uncleanWarnings)
        if type(python) == str:
            python = [python]

        setupCommands = [
            ["rm", "-rf", "install"],
            ["mkdir", "-p", "install/bin", "install/lib"],
            [easy_install, "--install-dir", "install/lib",
                           "--script-dir", "install/bin",
        for command in setupCommands:
            self.addStep(shell.ShellCommand, command=command,
                         env={"PYTHONPATH": "install/lib"},
            name=reactor, python=python,
            reactor=reactor, flunkOnFailure=True,
            warnOnFailure=False, workdir="Twisted/install",
            env={"PYTHONPATH": "lib"})

comment:2 Changed at 2008-06-02T23:14:52Z by zooko

I wouldn't mind killing the make install and/or make install PREFIX=${INSTALLDIR} options instead of adding tests for them and fixing them. See related ticket #179 (rewrite our Makefile in Python instead of GNUmake).

comment:3 Changed at 2008-06-02T23:19:22Z by zooko

Let us add another kind of install that we want to test:

  • dpkg -i allmydata-tahoe-*.deb

comment:4 Changed at 2008-06-04T01:18:19Z by zooko

  • Milestone changed from 1.1.0 to 1.1.1

comment:5 Changed at 2008-08-26T23:37:37Z by zooko

Here is an analogous ticket from the Nevow project: http://divmod.org/trac/ticket/2630 (installation of Nevow doesn't have automated tests).

They configured their buildbot to test Nevow installation with both setuptools and distutils.

comment:6 Changed at 2008-08-28T20:43:39Z by zooko

See also #348 (BuildBot? step to run tests from package) which is perhaps going to be fixed by the same patch that fixes this ticket -- if that patch makes it so that the buildbot both installs the package and runs the unit tests from the installed package.

comment:7 Changed at 2008-11-04T13:09:01Z by zooko

dreid tells me that the "make mac-exe" target has broken. So let us add to this ticket to automatically test "make mac-exe" so we'll know if we break it.

comment:8 Changed at 2009-01-02T18:46:49Z by zooko

  • Owner changed from zooko to nobody

comment:9 Changed at 2009-01-02T20:53:01Z by cgalvan

  • Owner changed from nobody to cgalvan
  • Status changed from new to assigned

comment:10 Changed at 2009-01-23T23:43:23Z by zooko

  • Resolution set to fixed
  • Status changed from assigned to closed

Okay, most of this ticket is fixed, mostly thanks to Chris Galvan: the buildbot step "build" executes python ./setup.py build, the "tahoe-version" step executes bin/tahoe --version, the "test" step executes python ./setup.py test, the "create-egg" step runs python ./setup.py bdist_egg, the "install-egg" step runs easy_install -d installdir $EGGFILE.

I no longer think we need to test using make since python ./setup.py is now sufficient (except for specialized uses for developers, such as make quicktest.

Other things suggested in this ticket, such as testing dpkg -i allmydata-tahoe*.deb, should probably be moved to new tickets.

comment:11 Changed at 2009-01-23T23:45:25Z by zooko

Created #593 (test installation of .deb's).

comment:12 Changed at 2009-01-23T23:47:00Z by zooko

Created #594 (test "make mac-exe").

Note: See TracTickets for help on using tickets.