From 4474aba1e77be2d643eb684298b7d5479cad9a1f Mon Sep 17 00:00:00 2001 From: Billy O'Neal Date: Wed, 20 Oct 2021 22:51:29 -0700 Subject: [PATCH] [ci] Attempt to make CI more reliable by using robocopy to delete (#20889) --- scripts/azure-pipelines/test-modified-ports.ps1 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/azure-pipelines/test-modified-ports.ps1 b/scripts/azure-pipelines/test-modified-ports.ps1 index a972c46115..faebe4522e 100755 --- a/scripts/azure-pipelines/test-modified-ports.ps1 +++ b/scripts/azure-pipelines/test-modified-ports.ps1 @@ -116,6 +116,15 @@ $xmlFile = Join-Path $xmlResults "$Triplet.xml" $failureLogs = Join-Path $ArtifactStagingDirectory 'failure-logs' +if ($IsWindows) +{ + mkdir empty + cmd /c "robocopy.exe empty `"$buildtreesRoot`" /MIR /NFL /NDL /NC /NP > nul" + cmd /c "robocopy.exe empty `"$packagesRoot`" /MIR /NFL /NDL /NC /NP > nul" + cmd /c "robocopy.exe empty `"$installRoot`" /MIR /NFL /NDL /NC /NP > nul" + rmdir empty +} + & "./vcpkg$executableExtension" x-ci-clean @commonArgs if ($LASTEXITCODE -ne 0) {