Test the new build

Before submitting a merge proposal to add the merged package to the Archive, test it to ensure there are no regressions.

Merging series

The article series provides guidance on performing package merges.

Process overview:
How to do a merge:
  1. Preliminary steps

  2. Merge process

  3. Fix the changelog

  4. Upload a PPA

  5. Test the new build (this article)

  6. Submit Merge Proposal

Extra:

Run package tests

See How to run package tests.

Test upgrading from the previous version

  1. Create and start a new LXD container to test in:

    $ lxc launch ubuntu-daily:ubuntu/<ubuntu-codename> tester && lxc exec tester bash
    
  2. Install the currently available version of the package you’ve been working on:

    $ apt update && apt dist-upgrade -y && apt install -y at
    
  3. Run the test:

    echo "echo xyz > test.txt" | at now + 1 minute && sleep 1m && cat test.txt && rm test.txt
    
  4. Add your PPA to the virtual system to upgrade the package to the version you want to test:

    $ sudo add-apt-repository -y ppa:kstenerud/at-merge-lp1802914
    

    If the Ubuntu release for which you’ve built the package is not yet available, modify the source list entry. For example:

    $ vi /etc/apt/sources.list.d/kstenerud-ubuntu-at-merge-lp1802914-cosmic.list
    * change cosmic to disco
    
  5. Upgrade to the new version of the package from your PPA:

    $ apt update && apt dist-upgrade -y
    
  6. Test the upgraded version:

    $ echo "echo abc > test.txt" | at now + 1 minute && sleep 1m && cat test.txt && rm test.txt
    

Test installing the latest from scratch

  1. Create and start a new LXD container to test in:

    $ lxc launch ubuntu-daily:ubuntu/<ubuntu-codename> tester && lxc exec tester bash
    
  2. Add your PPA to the virtual system to upgrade the package to the version you want to test:

    $ sudo add-apt-repository -y ppa:kstenerud/at-merge-lp1802914
    
  3. Install the new version of the package from your PPA:

    $ apt update && apt dist-upgrade -y && apt install -y at
    
  4. Run the test:

    echo "echo xyz > test.txt" | at now + 1 minute && sleep 1m && cat test.txt && rm test.txt
    

Other smoke tests

  • Run various basic commands.

  • Run regression tests.

  • For a package that Build-Depends on itself (openjdk, jruby, kotlin, etc.), build it using the new version.

Next