summaryrefslogtreecommitdiff
path: root/tests/cloud_tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cloud_tests')
-rw-r--r--tests/cloud_tests/bddeb.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/tests/cloud_tests/bddeb.py b/tests/cloud_tests/bddeb.py
index 53dbf74e..fe805356 100644
--- a/tests/cloud_tests/bddeb.py
+++ b/tests/cloud_tests/bddeb.py
@@ -11,7 +11,7 @@ from tests.cloud_tests import (config, LOG)
from tests.cloud_tests import (platforms, images, snapshots, instances)
from tests.cloud_tests.stage import (PlatformComponent, run_stage, run_single)
-build_deps = ['devscripts', 'equivs', 'git', 'tar']
+pre_reqs = ['devscripts', 'equivs', 'git', 'tar']
def _out(cmd_res):
@@ -26,13 +26,10 @@ def build_deb(args, instance):
@return_value: tuple of results and fail count
"""
# update remote system package list and install build deps
- LOG.debug('installing build deps')
- pkgs = ' '.join(build_deps)
+ LOG.debug('installing pre-reqs')
+ pkgs = ' '.join(pre_reqs)
cmd = 'apt-get update && apt-get install --yes {}'.format(pkgs)
instance.execute(['/bin/sh', '-c', cmd])
- # TODO Remove this call once we have a ci-deps Makefile target
- instance.execute(['mk-build-deps', '--install', '-t',
- 'apt-get --no-install-recommends --yes', 'cloud-init'])
# local tmpfile that must be deleted
local_tarball = tempfile.NamedTemporaryFile().name
@@ -40,7 +37,7 @@ def build_deb(args, instance):
# paths to use in remote system
output_link = '/root/cloud-init_all.deb'
remote_tarball = _out(instance.execute(['mktemp']))
- extract_dir = _out(instance.execute(['mktemp', '--directory']))
+ extract_dir = '/root'
bddeb_path = os.path.join(extract_dir, 'packages', 'bddeb')
git_env = {'GIT_DIR': os.path.join(extract_dir, '.git'),
'GIT_WORK_TREE': extract_dir}
@@ -56,6 +53,11 @@ def build_deb(args, instance):
instance.execute(['git', 'commit', '-a', '-m', 'tmp', '--allow-empty'],
env=git_env)
+ LOG.debug('installing deps')
+ deps_path = os.path.join(extract_dir, 'tools', 'read-dependencies')
+ instance.execute([deps_path, '--install', '--test-distro',
+ '--distro', 'ubuntu', '--python-version', '3'])
+
LOG.debug('building deb in remote system at: %s', output_link)
bddeb_args = args.bddeb_args.split() if args.bddeb_args else []
instance.execute([bddeb_path, '-d'] + bddeb_args, env=git_env)