diff options
| author | Romeo Fragomeli <rfr@odoo.com> | 2020-04-08 10:53:00 +0000 |
|---|---|---|
| committer | Romeo Fragomeli <rfr@odoo.com> | 2020-04-16 13:28:07 +0000 |
| commit | fbd1d7584a0c7c505c1af8a18ae245ac2aac52a6 (patch) | |
| tree | 46895f73fa68242aacfabc63a2a4e3d25493ae63 | |
| parent | f91665ac6636a76a7eaefbfdcd7049e0aea471b3 (diff) | |
[FIX] tests,tools: remove unused code
Due to this commit: odoo/odoo@0ea67467b1301b39a263a386a622e931784eb0de ( https://github.com/odoo/odoo/blob/0ea67467b1301b39a263a386a622e931784eb0de/odoo/tools/config.py#L521 )
the screencasts value is not a string anymore but a valid PATH.
So now you can't set '1', 'true' or 't' to force to have the
same directory as the screenshot dir.
Steps to reproduce:
odoo-bin ... --screencasts 1 (with a failed JS test to produce a screencast)
closes odoo/odoo#49665
X-original-commit: ab1bf59a3b78f3c0857755cb2439636b6df297c3
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Signed-off-by: rfr-odoo <rfr-odoo@users.noreply.github.com>
| -rw-r--r-- | doc/reference/cmdline.rst | 3 | ||||
| -rw-r--r-- | odoo/tests/common.py | 6 | ||||
| -rw-r--r-- | odoo/tools/config.py | 2 |
3 files changed, 2 insertions, 9 deletions
diff --git a/doc/reference/cmdline.rst b/doc/reference/cmdline.rst index 423371712e9..e55b9147d92 100644 --- a/doc/reference/cmdline.rst +++ b/doc/reference/cmdline.rst @@ -71,9 +71,6 @@ Running the server Enable screencasts and specify directory where to write screencasts files. The ``ffmpeg`` utility needs to be installed to encode frames into a video file. Otherwise frames will be kept instead of the video file. - - ``1``, ``t`` or ``true`` can be used to use the same directory as the above - mentioned ``--screenshots`` option. .. _reference/cmdline/server/database: diff --git a/odoo/tests/common.py b/odoo/tests/common.py index fc23ea71e64..33c8f0ed695 100644 --- a/odoo/tests/common.py +++ b/odoo/tests/common.py @@ -627,11 +627,7 @@ class ChromeBrowser(): self.screenshots_dir = os.path.join(otc['screenshots'], get_db_name(), 'screenshots') self.screencasts_dir = None if otc['screencasts']: - if otc['screencasts'] in ('1', 'true', 't'): - self.screencasts_dir = os.path.join(otc['screenshots'], get_db_name(), 'screencasts') - else: - self.screencasts_dir =os.path.join(otc['screencasts'], get_db_name(), 'screencasts') - + self.screencasts_dir = os.path.join(otc['screencasts'], get_db_name(), 'screencasts') self.screencast_frames = [] os.makedirs(self.screenshots_dir, exist_ok=True) diff --git a/odoo/tools/config.py b/odoo/tools/config.py index a50e3a8460c..8489775af85 100644 --- a/odoo/tools/config.py +++ b/odoo/tools/config.py @@ -174,7 +174,7 @@ class configmanager(object): group.add_option("--screencasts", dest="screencasts", action="store", my_default=None, metavar='DIR', - help="Screencasts will go in DIR/{db_name}/screencasts. '1' can be used to force the same dir as for screenshots.") + help="Screencasts will go in DIR/{db_name}/screencasts.") temp_tests_dir = os.path.join(tempfile.gettempdir(), 'odoo_tests') group.add_option("--screenshots", dest="screenshots", action="store", my_default=temp_tests_dir, metavar='DIR', |
