[FIX] tests,tools: remove unused code

Due to this commit: odoo/odoo@0ea67467b1 ( 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>
This commit is contained in:
Romeo Fragomeli
2020-04-16 13:28:07 +00:00
parent f91665ac66
commit fbd1d7584a
3 changed files with 2 additions and 9 deletions
-3
View File
@@ -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:
+1 -5
View File
@@ -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)
+1 -1
View File
@@ -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',