summaryrefslogtreecommitdiff
path: root/setup/package.py
diff options
context:
space:
mode:
authorChristophe Monniez <moc@odoo.com>2017-10-12 16:31:19 +0200
committerChristophe Monniez <moc@odoo.com>2017-10-12 17:24:36 +0200
commit5dfa00cb6cd800020b78086a2a2f15c78f5e0dc9 (patch)
treeb89ec98dae52dfe3709414a625c8563f4c35adfd /setup/package.py
parent855a56ba2962ea5e8a5a52c5552de0551157ae85 (diff)
[FIX] packages: fix docker images builds tests
The automated tests of rpm,deb and src packages are using docker images and containers. Those tests were not working as expected due to various small glitches: * some debian python- packages were missing in the Debian image * pip was called instead of pip3 for the src test * a wrong addons path was given for the tests * the containers id's were wrong due to a bytes implicitly converted to str
Diffstat (limited to 'setup/package.py')
-rwxr-xr-xsetup/package.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/setup/package.py b/setup/package.py
index 3fcb96aed92..90999b8b9c0 100755
--- a/setup/package.py
+++ b/setup/package.py
@@ -144,7 +144,7 @@ class OdooDocker(object):
)
time.sleep(2) # let the bash start
self.docker.logfile_read = self.log_file
- self.id = subprocess.check_output('docker ps -l -q', shell=True)
+ self.id = subprocess.check_output('docker ps -l -q', shell=True).strip().decode('ascii')
def end(self):
try:
@@ -339,14 +339,14 @@ def test_tgz(o):
with docker('odoo-%s-src-nightly-tests' % docker_version, o.build_dir, o.pub) as wheezy:
wheezy.release = '*.tar.gz'
wheezy.system("service postgresql start")
- wheezy.system('pip install /opt/release/%s' % wheezy.release)
+ wheezy.system('pip3 install /opt/release/%s' % wheezy.release)
wheezy.system("useradd --system --no-create-home odoo")
wheezy.system('su postgres -s /bin/bash -c "createuser -s odoo"')
wheezy.system('su postgres -s /bin/bash -c "createdb mycompany"')
wheezy.system('mkdir /var/lib/odoo')
wheezy.system('chown odoo:odoo /var/lib/odoo')
- wheezy.system('su odoo -s /bin/bash -c "odoo --addons-path=/usr/local/lib/python2.7/dist-packages/odoo/addons -d mycompany -i base --stop-after-init"')
- wheezy.system('su odoo -s /bin/bash -c "odoo --addons-path=/usr/local/lib/python2.7/dist-packages/odoo/addons -d mycompany &"')
+ wheezy.system('su odoo -s /bin/bash -c "odoo -d mycompany -i base --stop-after-init"')
+ wheezy.system('su odoo -s /bin/bash -c "odoo -d mycompany &"')
def test_deb(o):
logging.info('Testing deb package in docker')