automate testing of installation #434

Closed
opened 2008-06-02 16:36:35 +00:00 by zooko · 9 comments

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.

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.
zooko added the
packaging
major
defect
1.0.0
labels 2008-06-02 16:36:35 +00:00
zooko added this to the 1.1.0 milestone 2008-06-02 16:36:35 +00:00
zooko self-assigned this 2008-06-02 16:36:35 +00:00
Author

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"},
                         haltOnFailure=True)
        self.addTrialStep(
            name=reactor, python=python,
            reactor=reactor, flunkOnFailure=True,
            warnOnFailure=False, workdir="Twisted/install",
            env={"PYTHONPATH": "lib"})



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"}, haltOnFailure=True) self.addTrialStep( name=reactor, python=python, reactor=reactor, flunkOnFailure=True, warnOnFailure=False, workdir="Twisted/install", env={"PYTHONPATH": "lib"}) ```
Author

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

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

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

  • dpkg -i allmydata-tahoe-*.deb
Let us add another kind of install that we want to test: * `dpkg -i allmydata-tahoe-*.deb`
Author

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.

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

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.

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

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.

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

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.

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.
zooko added the
fixed
label 2009-01-23 23:43:23 +00:00
zooko closed this issue 2009-01-23 23:43:23 +00:00
Author

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

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

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

Created #594 (test "make mac-exe").
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

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