summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorIWASE Yusuke <iwase.yusuke0@gmail.com>2016-11-15 11:23:16 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-11-15 20:58:16 +0900
commit2b57fadd2c00d7f0218c6af0a00f4a63e6176959 (patch)
treea41a573a4bffcdf64f5a37dadb1188bc39db5b13
parent77f15902c4209e8a9ec285769e928296f96705c8 (diff)
docker_base: Add missing requirements for test-requires
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/tests/integrated/common/docker_base.py36
1 files changed, 25 insertions, 11 deletions
diff --git a/ryu/tests/integrated/common/docker_base.py b/ryu/tests/integrated/common/docker_base.py
index 13fe223f..b1f0a5fa 100644
--- a/ryu/tests/integrated/common/docker_base.py
+++ b/ryu/tests/integrated/common/docker_base.py
@@ -196,25 +196,39 @@ class DockerImage(object):
def create_ryu(self, tagname='ryu', image=None, check_exist=False):
if check_exist and self.exist(tagname):
return tagname
- workdir = TEST_BASE_DIR + '/' + tagname
+ workdir = '%s/%s' % (TEST_BASE_DIR, tagname)
workdir_ctn = '/root/osrg/ryu'
- pkges = 'telnet tcpdump iproute2 '
- pkges += 'gcc python-pip python-dev libffi-dev libssl-dev'
+ pkges = ' '.join([
+ 'telnet',
+ 'tcpdump',
+ 'iproute2',
+ 'python-setuptools',
+ 'python-pip',
+ 'gcc',
+ 'python-dev',
+ 'libffi-dev',
+ 'libssl-dev',
+ 'libxml2-dev',
+ 'libxslt1-dev',
+ 'zlib1g-dev',
+ ])
if image:
use_image = image
else:
use_image = self.baseimage
c = CmdBuffer()
- c << 'FROM ' + use_image
- c << 'RUN apt-get update'
- c << 'RUN apt-get install -qy --no-install-recommends ' + pkges
- c << 'RUN pip install -U six paramiko msgpack-rpc-python'
- c << 'ADD ryu ' + workdir_ctn
- install = 'RUN cd %s && pip install -r tools/pip-requires ' % workdir_ctn
- install += '&& python setup.py install'
+ c << 'FROM %s' % use_image
+ c << 'ADD ryu %s' % workdir_ctn
+ install = ' '.join([
+ 'RUN apt-get update',
+ '&& apt-get install -qy --no-install-recommends %s' % pkges,
+ '&& cd %s' % workdir_ctn,
+ '&& pip install -r tools/pip-requires -r tools/optional-requires',
+ '&& python setup.py install',
+ ])
c << install
- self.cmd.sudo('rm -rf ' + workdir)
+ self.cmd.sudo('rm -rf %s' % workdir)
self.cmd.execute('mkdir -p ' + workdir)
self.cmd.execute("echo '%s' > %s/Dockerfile" % (str(c), workdir))
self.cmd.execute('cp -r ../ryu %s/' % workdir)