Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 0 additions & 55 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,61 +97,6 @@ jobs:
mingw-w64-ucrt-x86_64-boost
mingw-w64-ucrt-x86_64-nlohmann-json

- name: Prepare tests
id: prepare-tests
if: runner.os == 'Windows'
shell: pwsh
run: |
# function to download and extract a zip file
function DownloadAndExtract {
param (
[string]$Uri,
[string]$OutFile
)

$maxRetries = 5
$retryCount = 0
$success = $false

while (-not $success -and $retryCount -lt $maxRetries) {
$retryCount++
Write-Host "Downloading $Uri to $OutFile, attempt $retryCount of $maxRetries"
try {
Invoke-WebRequest -Uri $Uri -OutFile $OutFile
$success = $true
} catch {
Write-Host "Attempt $retryCount of $maxRetries failed with error: $($_.Exception.Message). Retrying..."
Start-Sleep -Seconds 5
}
}

if (-not $success) {
Write-Host "Failed to download the file after $maxRetries attempts."
exit 1
}

# use .NET to get the base name of the file
$baseName = (Get-Item $OutFile).BaseName

# Extract the zip file
Expand-Archive -Path $OutFile -DestinationPath $baseName
}

# virtual display driver
DownloadAndExtract `
-Uri "https://www.amyuni.com/downloads/usbmmidd_v2.zip" `
-OutFile "usbmmidd_v2.zip"

# install
Set-Location -Path usbmmidd_v2/usbmmidd_v2
./deviceinstaller64 install usbmmidd.inf usbmmidd

# create 2 virtual displays, using 3+ can crash the runner
# see: https://github.com/LizardByte/libdisplaydevice/pull/36
for ($i = 1; $i -le 2; $i++) {
./deviceinstaller64 enableidd 1
}

- name: Setup python
id: setup-python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
Expand Down
6 changes: 5 additions & 1 deletion tests/unit/windows/test_win_display_device_hdr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,13 @@ namespace {
} // namespace

TEST_F_S(GetSetHdrStates) {
const auto available_devices {getAvailableDevices(*m_layer)};
const auto available_devices {getAvailableDevices(*m_layer, false)};
ASSERT_TRUE(available_devices);

if (available_devices->empty()) {
GTEST_SKIP_("No displays are available in the system.");
}

const auto topology_guard {makeTopologyGuard(m_win_dd)};
ASSERT_TRUE(m_win_dd.setTopology(makeExtendedTopology(*available_devices)));

Expand Down
Loading