VirtualBox

Ignore:
Timestamp:
Nov 13, 2023 8:09:28 AM (17 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
160187
Message:

ValKit: Simple algorithm for basic screenshot validation of a Windows VM (fix for Python 2)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/tests/additions/tdAddGuestCtrl.py

    r101444 r102076  
    55145514                cDesktopPixelsBlue += int(iBlue > iRed and iBlue > iGreen);
    55155515
    5516         fpRatioDesktop = cDesktopPixels / cPixels;
     5516        fpRatioDesktop = float(cDesktopPixels) / float(cPixels);
    55175517        reporter.log2('Ratio of not too dark or bright pixels %.2f' % (fpRatioDesktop));
    55185518
    55195519        if fpRatioDesktop > 0.1:
    5520             fpRatioBlue = cDesktopPixelsBlue / cDesktopPixels;
     5520            fpRatioBlue = float(cDesktopPixelsBlue) / float(cDesktopPixels);
    55215521            reporter.log2('Ratio of blue pixels %.2f ' % (fpRatioBlue));
    55225522            if fpRatioBlue > 0.5:
     
    55385538                iWidth, iHeight, _, _, _, _ = oSession.o.console.display.getScreenResolution(iScreenId);
    55395539            else:
    5540                 iWidth, iHeight, _, _, _ = oSession.o.console.display.getScreenResolution(iScreenId)
     5540                iWidth, iHeight, _, _, _ = oSession.o.console.display.getScreenResolution(iScreenId);
    55415541
    55425542            aRGBData = oSession.o.console.display.takeScreenShotToArray(iScreenId, iWidth, iHeight,
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