diff options
| author | Christophe Simonis <chs@odoo.com> | 2015-02-20 18:16:01 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2015-02-20 18:16:01 +0100 |
| commit | aec02cb4935103aa7d158b56397c191932b35fa7 (patch) | |
| tree | 82915059f96448510e6b1c5183611175c483e579 /setup/package.py | |
| parent | e13923c0db1fd4ba9c98eacdcd987c6be7575a5f (diff) | |
| parent | d350f5b59e8905a76e965b6f34a0db14dbb53af0 (diff) | |
[MERGE] forward port of branch 8.0 up to d350f5b
Diffstat (limited to 'setup/package.py')
| -rwxr-xr-x | setup/package.py | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/setup/package.py b/setup/package.py index 71de37bbf99..17668545847 100755 --- a/setup/package.py +++ b/setup/package.py @@ -266,11 +266,12 @@ def build_deb(o): subprocess.call(cmd, cwd=o.build_dir) deb = pexpect.spawn('dpkg-buildpackage -rfakeroot -k%s' % GPGID, cwd=o.build_dir) deb.logfile = stdout - deb.expect_exact('Enter passphrase: ', timeout=1200) - deb.send(GPGPASSPHRASE + '\r\n') - deb.expect_exact('Enter passphrase: ') - deb.send(GPGPASSPHRASE + '\r\n') - deb.expect(pexpect.EOF) + if GPGPASSPHRASE: + deb.expect_exact('Enter passphrase: ', timeout=1200) + deb.send(GPGPASSPHRASE + '\r\n') + deb.expect_exact('Enter passphrase: ') + deb.send(GPGPASSPHRASE + '\r\n') + deb.expect(pexpect.EOF, timeout=1200) system(['mv', glob('%s/../odoo_*.deb' % o.build_dir)[0], '%s' % o.build_dir]) system(['mv', glob('%s/../odoo_*.dsc' % o.build_dir)[0], '%s' % o.build_dir]) system(['mv', glob('%s/../odoo_*_amd64.changes' % o.build_dir)[0], '%s' % o.build_dir]) @@ -288,24 +289,33 @@ def build_exe(o): # Stage: testing #---------------------------------------------------------- def _prepare_testing(o): - if not o.no_tarball or not o.no_debian: + if not o.no_tarball: + subprocess.call(["mkdir", "docker_src"], cwd=o.build_dir) + subprocess.call(["cp", "package.dfsrc", os.path.join(o.build_dir, "docker_src", "Dockerfile")], + cwd=os.path.join(o.odoo_dir, "setup")) + # Use rsync to copy requirements.txt in order to keep original permissions + subprocess.call(["rsync", "-a", "requirements.txt", os.path.join(o.build_dir, "docker_src")], + cwd=os.path.join(o.odoo_dir)) + subprocess.call(["docker", "build", "-t", "odoo-%s-src-nightly-tests" % version, "."], + cwd=os.path.join(o.build_dir, "docker_src")) + if not o.no_debian: subprocess.call(["mkdir", "docker_debian"], cwd=o.build_dir) subprocess.call(["cp", "package.dfdebian", os.path.join(o.build_dir, "docker_debian", "Dockerfile")], cwd=os.path.join(o.odoo_dir, "setup")) # Use rsync to copy requirements.txt in order to keep original permissions subprocess.call(["rsync", "-a", "requirements.txt", os.path.join(o.build_dir, "docker_debian")], cwd=os.path.join(o.odoo_dir)) - subprocess.call(["docker", "build", "-t", "odoo-debian-nightly-tests", "."], + subprocess.call(["docker", "build", "-t", "odoo-%s-debian-nightly-tests" % version, "."], cwd=os.path.join(o.build_dir, "docker_debian")) if not o.no_rpm: subprocess.call(["mkdir", "docker_centos"], cwd=o.build_dir) subprocess.call(["cp", "package.dfcentos", os.path.join(o.build_dir, "docker_centos", "Dockerfile")], cwd=os.path.join(o.odoo_dir, "setup")) - subprocess.call(["docker", "build", "-t", "odoo-centos-nightly-tests", "."], + subprocess.call(["docker", "build", "-t", "odoo-%s-centos-nightly-tests" % version, "."], cwd=os.path.join(o.build_dir, "docker_centos")) def test_tgz(o): - with docker('odoo-debian-nightly-tests', o.build_dir, o.pub) as wheezy: + with docker('odoo-%s-src-nightly-tests' % version, o.build_dir, o.pub) as wheezy: wheezy.release = '*.tar.gz' wheezy.system("service postgresql start") wheezy.system('/usr/local/bin/pip install /opt/release/%s' % wheezy.release) @@ -318,7 +328,7 @@ def test_tgz(o): wheezy.system('su odoo -s /bin/bash -c "odoo.py --addons-path=/usr/local/lib/python2.7/dist-packages/openerp/addons -d mycompany &"') def test_deb(o): - with docker('odoo-debian-nightly-tests', o.build_dir, o.pub) as wheezy: + with docker('odoo-%s-debian-nightly-tests' % version, o.build_dir, o.pub) as wheezy: wheezy.release = '*.deb' wheezy.system("service postgresql start") wheezy.system('su postgres -s /bin/bash -c "createdb mycompany"') @@ -328,7 +338,7 @@ def test_deb(o): wheezy.system('su odoo -s /bin/bash -c "odoo.py -c /etc/odoo/openerp-server.conf -d mycompany &"') def test_rpm(o): - with docker('odoo-centos-nightly-tests', o.build_dir, o.pub) as centos7: + with docker('odoo-%s-centos-nightly-tests' % version, o.build_dir, o.pub) as centos7: centos7.release = '*.noarch.rpm' # Start postgresql centos7.system('su postgres -c "/usr/bin/pg_ctl -D /var/lib/postgres/data start"') |
