2021-05-05 13:37:53 +03:00
|
|
|
. $PSScriptRoot/../end-to-end-tests-prelude.ps1
|
|
|
|
|
2021-06-12 05:59:46 +03:00
|
|
|
$downloadsRoot = Join-Path $TestingRoot 'downloads'
|
|
|
|
|
2021-05-05 13:37:53 +03:00
|
|
|
$CurrentTest = "Clean After Build"
|
|
|
|
|
2021-06-12 05:59:46 +03:00
|
|
|
$InstalledHeader = Join-Path $installRoot "$Triplet/include/vcpkg-clean-after-build-test-port.h"
|
|
|
|
$DownloadedFile = Join-Path $downloadsRoot 'clean_after_build_test.txt'
|
|
|
|
$PackageRoot = Join-Path $packagesRoot "vcpkg-clean-after-build-test-port_$Triplet"
|
|
|
|
$PackageSrc = Join-Path $buildtreesRoot "vcpkg-clean-after-build-test-port/src"
|
2021-05-05 13:37:53 +03:00
|
|
|
|
2021-06-12 05:59:46 +03:00
|
|
|
$installTestPortArgs = `
|
|
|
|
@("install", "vcpkg-clean-after-build-test-port", "--no-binarycaching", "--downloads-root=$downloadsRoot")
|
2021-05-05 13:37:53 +03:00
|
|
|
|
|
|
|
Refresh-TestRoot
|
2021-06-12 05:59:46 +03:00
|
|
|
Run-Vcpkg -TestArgs ($commonArgs + $installTestPortArgs)
|
|
|
|
Require-FileExists $InstalledHeader
|
|
|
|
Require-FileExists $DownloadedFile
|
|
|
|
Require-FileExists $PackageRoot
|
|
|
|
Require-FileExists $PackageSrc
|
2021-05-05 13:37:53 +03:00
|
|
|
|
|
|
|
Refresh-TestRoot
|
2021-06-12 05:59:46 +03:00
|
|
|
Run-Vcpkg -TestArgs ($commonArgs + $installTestPortArgs + @("--clean-packages-after-build"))
|
|
|
|
Require-FileExists $InstalledHeader
|
|
|
|
Require-FileExists $DownloadedFile
|
|
|
|
Require-FileNotExists $PackageRoot
|
|
|
|
Require-FileExists $PackageSrc
|
2021-05-05 13:37:53 +03:00
|
|
|
|
|
|
|
Refresh-TestRoot
|
2021-06-12 05:59:46 +03:00
|
|
|
Run-Vcpkg -TestArgs ($commonArgs + $installTestPortArgs + @("--clean-buildtrees-after-build"))
|
|
|
|
Require-FileExists $InstalledHeader
|
|
|
|
Require-FileExists $DownloadedFile
|
|
|
|
Require-FileExists $PackageRoot
|
|
|
|
Require-FileNotExists $PackageSrc
|
2021-05-05 13:37:53 +03:00
|
|
|
|
|
|
|
Refresh-TestRoot
|
2021-06-12 05:59:46 +03:00
|
|
|
Run-Vcpkg -TestArgs ($commonArgs + $installTestPortArgs + @(
|
|
|
|
"--clean-packages-after-build",
|
|
|
|
"--clean-buildtrees-after-build"
|
|
|
|
))
|
|
|
|
Require-FileExists $InstalledHeader
|
|
|
|
Require-FileExists $DownloadedFile
|
|
|
|
Require-FileNotExists $PackageRoot
|
|
|
|
Require-FileNotExists $PackageSrc
|
2021-05-05 13:37:53 +03:00
|
|
|
|
|
|
|
Refresh-TestRoot
|
2021-06-12 05:59:46 +03:00
|
|
|
Run-Vcpkg -TestArgs ($commonArgs + $installTestPortArgs + @("--clean-buildtrees-after-build"))
|
|
|
|
Require-FileExists $InstalledHeader
|
|
|
|
Require-FileExists $DownloadedFile
|
|
|
|
Require-FileExists $PackageRoot
|
|
|
|
Require-FileNotExists $PackageSrc
|
2021-05-05 13:37:53 +03:00
|
|
|
|
|
|
|
Refresh-TestRoot
|
2021-06-12 05:59:46 +03:00
|
|
|
Run-Vcpkg -TestArgs ($commonArgs + $installTestPortArgs + @(
|
|
|
|
"--clean-downloads-after-build",
|
|
|
|
"--clean-packages-after-build",
|
|
|
|
"--clean-buildtrees-after-build"
|
|
|
|
))
|
|
|
|
Require-FileExists $InstalledHeader
|
|
|
|
Require-FileNotExists $DownloadedFile
|
|
|
|
Require-FileNotExists $PackageRoot
|
|
|
|
Require-FileNotExists $PackageSrc
|
2021-05-05 13:37:53 +03:00
|
|
|
|
|
|
|
Refresh-TestRoot
|
2021-06-12 05:59:46 +03:00
|
|
|
Run-Vcpkg -TestArgs ($commonArgs + $installTestPortArgs + @("--clean-after-build"))
|
|
|
|
Require-FileExists $InstalledHeader
|
|
|
|
Require-FileNotExists $DownloadedFile
|
|
|
|
Require-FileNotExists $PackageRoot
|
|
|
|
Require-FileNotExists $PackageSrc
|
2021-05-05 13:37:53 +03:00
|
|
|
|
|
|
|
Refresh-TestRoot
|
2021-06-12 05:59:46 +03:00
|
|
|
Run-Vcpkg -TestArgs ($commonArgs + $installTestPortArgs + @(
|
|
|
|
"--clean-after-build",
|
|
|
|
"--clean-downloads-after-build",
|
|
|
|
"--clean-packages-after-build",
|
|
|
|
"--clean-buildtrees-after-build"
|
|
|
|
))
|
|
|
|
Require-FileExists $InstalledHeader
|
|
|
|
Require-FileNotExists $DownloadedFile
|
|
|
|
Require-FileNotExists $PackageRoot
|
|
|
|
Require-FileNotExists $PackageSrc
|