[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
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user