From f91665ac6636a76a7eaefbfdcd7049e0aea471b3 Mon Sep 17 00:00:00 2001 From: Romeo Fragomeli Date: Fri, 3 Apr 2020 06:39:56 +0000 Subject: [PATCH] [FIX] tests: ffmpeg don't use the right path for screencast Screencasts were saved in the right directory (screencasts_frames_dir) but the given path for ffmpeg was wrong (screencasts_dir) and it wasn't possible to read theses files to make the video. After this commit, we use the screencast_frames folder to read files. Steps to reproduce: Execute Odoo with these additional command: --screencasts "folder_of_destination" --test-enable (with a failed JS test to produce a screencast) X-original-commit: 0c0b7a656388d65de15796f07a3f4cc93028f1d7 --- odoo/tests/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odoo/tests/common.py b/odoo/tests/common.py index 0d984051fef..fc23ea71e64 100644 --- a/odoo/tests/common.py +++ b/odoo/tests/common.py @@ -984,7 +984,7 @@ class ChromeBrowser(): if ffmpeg_path: framerate = int(len(self.screencast_frames) / (self.screencast_frames[-1].get('timestamp') - self.screencast_frames[0].get('timestamp'))) - r = subprocess.run([ffmpeg_path, '-framerate', str(framerate), '-i', '%s/frame_%%05d.png' % self.screencasts_dir, outfile]) + r = subprocess.run([ffmpeg_path, '-framerate', str(framerate), '-i', '%s/frame_%%05d.png' % self.screencasts_frames_dir, outfile]) self._logger.runbot('Screencast in: %s', outfile) else: outfile = outfile.strip('.mp4')