vm.class = lxd
# Start with an up to date system by default
vm.update = True
# External sources dependencies, packages are not recent enough
dulwich.clone = (git clone git://jelmer.uk/dulwich ../dulwich.git)
dulwich.install = (cd ../dulwich.git && ./setup.py install --user)
dulwich.install3 = (cd ../dulwich.git && python3 ./setup.py install --user)
subunit.clone = (git clone https://github.com/testing-cabal/subunit.git ../subunit)
fastimport.clone = (git clone git://jelmer.uk/python-fastimport.git ../fastimport.git)
fastimport.install = (cd ../fastimport.git && ./setup.py install --user)
fastimport.install3 = (cd ../fastimport.git && python3 ./setup.py install --user)

[brz]
# FIXME: we're stuck on xenial
# because paramiko 2.0.0 is broken:
# breezy.tests.test_transport.TestSSHConnections.test_bzr_connect_to_bzr_ssh
# runs into a deprecation issue which is only fixed in 2.3.0 which is
# available nowhere in ubuntu/debian /o\
# https://github.com/paramiko/paramiko/issues/1030
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=882322 -- vila 2018-05-16

# FIXME: Arguably this should be vm.build_deps=brz but it requires either an
# available package or at least a debian/ dir ? -- vila 2018-02-23
brz.build_deps = gcc, debhelper, python, python-all-dev, python3-all-dev, python-configobj, python3-configobj, python-docutils, python3-docutils, python-paramiko, python3-paramiko, python-subunit, python3-subunit, python-testtools, python3-testtools, subunit, cython, cython3, python-flake8, python3-flake8
subunit.build_deps = python-testscenarios, python3-testscenarios, python-testtools, python3-testtools
vm.packages = {brz.build_deps}, {subunit.build_deps}, bzr, git, python-junitxml
[brz-xenial]
vm.release = xenial
byoci.setup.command = ({dulwich.clone} && {dulwich.install} && {dulwich.install3} && {fastimport.clone} && {fastimport.install} && {fastimport.install3} && {subunit.clone})
# FIXME: bzr log -l2 should be by default -- vila 2018-03-09
byoci.tests.command = bash -o pipefail -c "bzr log -l2 && PYTHONPATH=../subunit/python:$PYTHONPATH PATH=../subunit/filters:$PATH make check-ci | subunit2junitxml -o ../results.xml -f | subunit2pyunit"
[brz-bionic]
vm.release = bionic
[brz-cosmic]
vm.release = cosmic
lxd.image = ubuntu-daily:{vm.release}/{vm.architecture}
[brz-buster]
vm.distribution = debian
vm.release = buster
vm.packages = {brz.build_deps}, {subunit.build_deps}, bzr, git, python-dulwich, python3-dulwich, python-junitxml
byoci.setup.command = ({subunit.clone})
byoci.tests.command = bash -o pipefail -c "bzr log -l2 && (PYTHONPATH=../subunit/python:$PYTHONPATH PATH=../subunit/filters:$PATH make check-ci | subunit2junitxml -o ../results.xml -f | subunit2pyunit)"
[brz-sid]
vm.distribution = debian
vm.release = sid
