aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2020-12-30 12:12:17 -0800
committerGitHub <noreply@github.com>2020-12-30 12:12:17 -0800
commit6772fdd145f2b69da18cdf14a5f93bc935aaf7e9 (patch)
treecccc445d310b1da351fbd9e2c398d1b223e8675d /scripts
parentf55a5d91d965ec3aa7c5ce63872fcd5d90cc635e (diff)
downloadvcpkg-6772fdd145f2b69da18cdf14a5f93bc935aaf7e9.tar.gz
vcpkg-6772fdd145f2b69da18cdf14a5f93bc935aaf7e9.zip
[vcpkg] Teach `vcpkg install` `--no-build-missing` (#15139)
* [vcpkg] Teach `vcpkg install` `--no-build-missing` This switch causes failure to restore from cache to abort the build instead of performing a just-in-time build. This is useful in complex CI systems where the build was expected to have been performed previously, such as via another pipeline. * [vcpkg] Rename flag to require binary caching
Diffstat (limited to 'scripts')
-rw-r--r--scripts/azure-pipelines/end-to-end-tests-dir/build-missing.ps118
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/azure-pipelines/end-to-end-tests-dir/build-missing.ps1 b/scripts/azure-pipelines/end-to-end-tests-dir/build-missing.ps1
new file mode 100644
index 000000000..5f318e6af
--- /dev/null
+++ b/scripts/azure-pipelines/end-to-end-tests-dir/build-missing.ps1
@@ -0,0 +1,18 @@
+. $PSScriptRoot/../end-to-end-tests-prelude.ps1
+
+$CurrentTest = "Build Missing tests"
+
+Run-Vcpkg -TestArgs ($commonArgs + @("install", "rapidjson", "--only-binarycaching","--x-binarysource=clear;files,$ArchiveRoot,read"))
+Throw-IfNotFailed
+Require-FileNotExists "$installRoot/$Triplet/include/rapidjson/rapidjson.h"
+
+# Create the rapidjson archive
+Remove-Item -Recurse -Force $installRoot
+Run-Vcpkg -TestArgs ($commonArgs + @("install", "rapidjson","--x-binarysource=clear;files,$ArchiveRoot,write"))
+Throw-IfFailed
+Require-FileExists "$installRoot/$Triplet/include/rapidjson/rapidjson.h"
+
+Remove-Item -Recurse -Force $installRoot
+Run-Vcpkg -TestArgs ($commonArgs + @("install", "rapidjson", "--only-binarycaching","--x-binarysource=clear;files,$ArchiveRoot,read"))
+Throw-IfFailed
+Require-FileExists "$installRoot/$Triplet/include/rapidjson/rapidjson.h"