VirtualBox

Changeset 96558 in vbox


Ignore:
Timestamp:
Aug 30, 2022 6:26:47 PM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
153426
Message:

ValKit/testdriver: Screen recording corrections. We do those upload last because they will usually be bigger and therefore more likely to cause trouble, so lets get the other logs up first. Noticed we have two --vbox-always-upload-xxxx options, so changed --vbox-recording-force-upload to --vbox-always-upload-recordings to fit better in. bugref:8733

Location:
trunk/src/VBox/ValidationKit/testdriver
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testdriver/reporter.py

    r96555 r96558  
    965965            finally:
    966966                g_oLock.acquire();
    967         elif sKind.startswith('video/'):
     967        elif sKind.startswith('screenrecording/'):
    968968            self.log(0, '*** Uploading "%s" - KIND: "%s" - DESC: "%s" ***'
    969969                        % (sSrcFilename, sKind, sDescription),  sCaller, sTsPrf);
  • trunk/src/VBox/ValidationKit/testdriver/vbox.py

    r96556 r96558  
    902902        self.fAlwaysUploadLogs  = False;
    903903        self.fAlwaysUploadScreenshots = False;
     904        self.fAlwaysUploadRecordings  = False; # Only upload recording files on failure by default.
    904905        self.fEnableDebugger          = True;
    905         self.aRecordingFiles          = [];
     906        self.adRecordingFiles         = [];
    906907        self.fRecordingEnabled        = False; # Don't record by default (yet).
    907908        self.fRecordingAudio          = False; # Don't record audio by default.
    908         self.fRecordingForceUpload    = False; # Only upload recording files on failure by default.
    909909        self.cSecsRecordingMax        = 0;     # No recording time limit in seconds.
    910910        self.cMbRecordingMax          = 0;     # No recording size limit in MiBs.
     
    18001800        reporter.log('  --vbox-always-upload-screenshots');
    18011801        reporter.log('      Whether to always upload final screen shots, or only do so on failure.');
     1802        reporter.log('  --vbox-always-upload-recordings, --no-vbox-always-upload-recordings');
     1803        reporter.log('      Whether to always upload recordings, or only do so on failure.');
     1804        reporter.log('      Default: --no-vbox-always-upload-recordings');
    18021805        reporter.log('  --vbox-debugger, --no-vbox-debugger');
    18031806        reporter.log('      Enables the VBox debugger, port at 5000');
     
    18091812        reporter.log('      Enables/disables audio recording.');
    18101813        reporter.log('      Default: --no-vbox-recording-audio');
    1811         reporter.log('  --vbox-recording-force-upload, --no-vbox-recording-force-upload');
    1812         reporter.log('      Force uploading recordings or only upload them on test failure.');
    1813         reporter.log('      Default: --no-vbox-recording-force-upload');
    18141814        reporter.log('  --vbox-recording-max-time <seconds>');
    18151815        reporter.log('      Limits the maximum recording time in seconds.');
     
    19221922        elif asArgs[iArg] == '--vbox-always-upload-screenshots':
    19231923            self.fAlwaysUploadScreenshots = True;
     1924        elif asArgs[iArg] == '--no-vbox-always-upload-recordings':
     1925            self.fAlwaysUploadRecordings = False;
     1926        elif asArgs[iArg] == '--vbox-always-upload-recordings':
     1927            self.fAlwaysUploadRecordings = True;
    19241928        elif asArgs[iArg] == '--vbox-debugger':
    19251929            self.fEnableDebugger = True;
     
    19341938        elif asArgs[iArg] == '--vbox-recording-audio':
    19351939            self.fRecordingAudio = True;
    1936         elif asArgs[iArg] == '--no-vbox-recording-force-upload':
    1937             self.fRecordingForceUpload = False;
    1938         elif asArgs[iArg] == '--vbox-recording-force-upload':
    1939             self.fRecordingForceUpload = True;
    19401940        elif asArgs[iArg] == '--vbox-recording-max-time':
    19411941            iArg += 1;
     
    25642564                                oScreen.filename = sRecFile;
    25652565                                sRecFile = oScreen.filename; # Get back the file from Main, in case it was modified somehow.
    2566                                 oRecFile = { "id" : oScreen.id, "file" : sRecFile };
    2567                                 self.aRecordingFiles.append(oRecFile);
     2566                                dRecFile = { 'id' : oScreen.id, 'file' : sRecFile };
     2567                                self.adRecordingFiles.append(dRecFile);
    25682568                                if self.fpApiVer >= 7.0:
    2569                                     aFeatures = [ vboxcon.RecordingFeature_Video ];
     2569                                    aFeatures = [ vboxcon.RecordingFeature_Video, ];
    25702570                                    if self.fRecordingAudio:
    25712571                                        aFeatures.append(vboxcon.RecordingFeature_Audio);
     
    25792579                                        uFeatures = uFeatures | vboxcon.RecordingFeature_Audio;
    25802580                                    oScreen.features = uFeatures;
    2581                                 reporter.log2('Recording screen %d to "%s"' % (oRecFile['id'], oRecFile['file']));
     2581                                reporter.log2('Recording screen %d to "%s"' % (dRecFile['id'], dRecFile['file'],));
    25822582                                oScreen.maxTime     = self.cSecsRecordingMax;
    25832583                                oScreen.maxFileSize = self.cMbRecordingMax;
     
    34393439                reporter.addLogFile(sLastScreenshotPath, 'screenshot/success', 'Last VM screenshot');
    34403440
    3441         # Add produced recording files (if any) to the log files to be uploaded.
    3442         if reporter.testErrorCount() > 0 \
    3443         or self.fRecordingForceUpload: # By default we only upload WebM file on failures, to save some space.
    3444             for oRecFile in self.aRecordingFiles:
    3445                 reporter.addLogFile(oRecFile['file'], 'video/webm', 'Recording of screen #%d' % (oRecFile['id'],));
    3446 
    34473441        # Add the guest OS log if it has been requested and taken successfully.
    34483442        if sOsKernelLog is not None:
     
    34823476                    except: pass; # paranoia
    34833477
     3478        # Upload the screen video recordings if appropriate.
     3479        if self.fAlwaysUploadRecordings or reporter.testErrorCount() > 0:
     3480            for dRecFile in self.adRecordingFiles:
     3481                reporter.addLogFile(dRecFile['file'],
     3482                                    'screenrecording/failure' if reporter.testErrorCount() > 0 else 'screenrecording/success',
     3483                                    'Recording of screen #%d' % (dRecFile['id'],));
    34843484
    34853485        return fRc;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette