VirtualBox

Changeset 77507 in vbox


Ignore:
Timestamp:
Feb 28, 2019 4:44:56 PM (6 years ago)
Author:
vboxsync
Message:

Validation Kit/reporter.py: Don't upload empty files (with 0 bytes size) to the Test Manager.

File:
1 edited

Legend:

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

    r76553 r77507  
    783783        self._writeOutput('%s: _doUploadFile: sHeader=%s' % (utils.getTimePrefix(), dHeader,));
    784784        oSrcFile.seek(0, 2);
    785         self._writeOutput('%s: _doUploadFile: size=%d' % (utils.getTimePrefix(), oSrcFile.tell(),));
     785        cbFileSize = oSrcFile.tell();
     786        self._writeOutput('%s: _doUploadFile: size=%d' % (utils.getTimePrefix(), cbFileSize,));
    786787        oSrcFile.seek(0);
     788
     789        if cbFileSize <= 0: # The Test Manager will bitch if the file size is 0, so skip uploading.
     790            self._writeOutput('%s: _doUploadFile: Empty file, skipping upload' % utils.getTimePrefix());
     791            return False;
    787792
    788793        from common import constants;
     
    17601765if __name__ != "checker": # pychecker avoidance.
    17611766    _InitReporterModule();
    1762 
Note: See TracChangeset for help on using the changeset viewer.

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