File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9797 mingw-w64-ucrt-x86_64-boost
9898 mingw-w64-ucrt-x86_64-nlohmann-json
9999
100- - name : Prepare tests
101- id : prepare-tests
102- if : runner.os == 'Windows'
103- shell : pwsh
104- run : |
105- # function to download and extract a zip file
106- function DownloadAndExtract {
107- param (
108- [string]$Uri,
109- [string]$OutFile
110- )
111-
112- $maxRetries = 5
113- $retryCount = 0
114- $success = $false
115-
116- while (-not $success -and $retryCount -lt $maxRetries) {
117- $retryCount++
118- Write-Host "Downloading $Uri to $OutFile, attempt $retryCount of $maxRetries"
119- try {
120- Invoke-WebRequest -Uri $Uri -OutFile $OutFile
121- $success = $true
122- } catch {
123- Write-Host "Attempt $retryCount of $maxRetries failed with error: $($_.Exception.Message). Retrying..."
124- Start-Sleep -Seconds 5
125- }
126- }
127-
128- if (-not $success) {
129- Write-Host "Failed to download the file after $maxRetries attempts."
130- exit 1
131- }
132-
133- # use .NET to get the base name of the file
134- $baseName = (Get-Item $OutFile).BaseName
135-
136- # Extract the zip file
137- Expand-Archive -Path $OutFile -DestinationPath $baseName
138- }
139-
140- # virtual display driver
141- DownloadAndExtract `
142- -Uri "https://www.amyuni.com/downloads/usbmmidd_v2.zip" `
143- -OutFile "usbmmidd_v2.zip"
144-
145- # install
146- Set-Location -Path usbmmidd_v2/usbmmidd_v2
147- ./deviceinstaller64 install usbmmidd.inf usbmmidd
148-
149- # create 2 virtual displays, using 3+ can crash the runner
150- # see: https://github.com/LizardByte/libdisplaydevice/pull/36
151- for ($i = 1; $i -le 2; $i++) {
152- ./deviceinstaller64 enableidd 1
153- }
154-
155100 - name : Setup python
156101 id : setup-python
157102 uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
Original file line number Diff line number Diff line change @@ -63,9 +63,13 @@ namespace {
6363} // namespace
6464
6565TEST_F_S (GetSetHdrStates) {
66- const auto available_devices {getAvailableDevices (*m_layer)};
66+ const auto available_devices {getAvailableDevices (*m_layer, false )};
6767 ASSERT_TRUE (available_devices);
6868
69+ if (available_devices->empty ()) {
70+ GTEST_SKIP_ (" No displays are available in the system." );
71+ }
72+
6973 const auto topology_guard {makeTopologyGuard (m_win_dd)};
7074 ASSERT_TRUE (m_win_dd.setTopology (makeExtendedTopology (*available_devices)));
7175
You can’t perform that action at this time.
0 commit comments