diff options
| author | Christophe Monniez <moc@odoo.com> | 2021-03-04 12:45:47 +0000 |
|---|---|---|
| committer | Christophe Monniez <moc@odoo.com> | 2021-03-04 15:09:02 +0000 |
| commit | 54b6a7a97e574249c22f16ea2756989e4bd4fac3 (patch) | |
| tree | eb290d368cd9e38b479fb952eb5c8a0abd5b079e | |
| parent | e5697dcfa7def73bd55ec908a165bec56229c284 (diff) | |
[FIX] packaging: remove dead code that prevent rpm build
Since 9c2ce1f12c2, more files are included in packaging. The rpm build
failed because shebang lines of packaged files must not use
`/usr/bin/env` [0] [1] [2].
As it seems that those old files are not of any use anymore, this commit
removes them.
[0] https://docs.fedoraproject.org/en-US/packaging-guidelines/#_shebang_lines
[1] https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#Multiple_Python_Runtimes
[2] https://pagure.io/packaging-committee/issue/738
closes odoo/odoo#67258
X-original-commit: d2a6ed1b2709eb0f1ea8a38818bd669e6d990cd8
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
| -rwxr-xr-x | odoo/tools/test-config-values | 25 | ||||
| -rw-r--r-- | odoo/tools/test-config-values-00.conf | 3 | ||||
| -rw-r--r-- | odoo/tools/test_config.py | 46 |
3 files changed, 0 insertions, 74 deletions
diff --git a/odoo/tools/test-config-values b/odoo/tools/test-config-values deleted file mode 100755 index 05e7929a3c0..00000000000 --- a/odoo/tools/test-config-values +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -import logging -import os -import signal -import sys -import threading -import traceback -import time - -import odoo - -odoo.tools.config.parse_config(sys.argv[1:]) -config = odoo.tools.config - -for name in [ - 'db_name', - 'addons_path', - 'demo', - 'osv_memory_count_limit', - 'osv_memory_age_limit', - ]: - print "%s: %s - %s" % (name, config[name], type(config[name])) - diff --git a/odoo/tools/test-config-values-00.conf b/odoo/tools/test-config-values-00.conf deleted file mode 100644 index bcf90301708..00000000000 --- a/odoo/tools/test-config-values-00.conf +++ /dev/null @@ -1,3 +0,0 @@ -[options] -osv_memory_count_limit = 5 -transient_age_limit = 3.4 diff --git a/odoo/tools/test_config.py b/odoo/tools/test_config.py deleted file mode 100644 index 2e05d288f4f..00000000000 --- a/odoo/tools/test_config.py +++ /dev/null @@ -1,46 +0,0 @@ -# -*- coding: utf-8 -*- - -""" Tests for the configuration file/command-line arguments. """ - -# This test should be run from its directory. - -# TODO A configmanager object cannot parse multiple times a config file -# and/or the command line, preventing to 'reload' a configuration. - -import os - -from . import config - -config_file_00 = os.path.join(os.path.dirname(__file__),'test-config-values-00.conf') - -# 1. No config file, no command-line arguments (a.k.a. default values) - -conf = config.configmanager() -conf.parse_config() - -assert conf['transient_age_limit'] == 1.0 -assert os.path.join(conf['root_path'], 'addons') == conf['addons_path'] - -# 2. No config file, some command-line arguments - -conf = config.configmanager() -# mess with the optparse.Option definition to allow an invalid path -conf.casts['addons_path'].action = 'store' -conf.parse_config(['--addons-path=/xyz/dont-exist', '--transient-age-limit=2.3']) - -assert conf['transient_age_limit'] == 2.3 -assert conf['addons_path'] == '/xyz/dont-exist' - -# 3. Config file, no command-line arguments - -conf = config.configmanager() -conf.parse_config(['-c', config_file_00]) - -assert conf['transient_age_limit'] == 3.4 - -# 4. Config file, and command-line arguments - -conf = config.configmanager() -conf.parse_config(['-c', config_file_00, '--transient-age-limit=2.3']) - -assert conf['transient_age_limit'] == 2.3 |
