From 29b8587f67df0a6511ffe796060cd2310fc75dc6 Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Wed, 25 May 2022 23:30:57 -0700 Subject: [PATCH] Fix benchmarking builds. --- azure-pipelines/pipelines.yml | 6 +++--- src/vcpkg-test/files.cpp | 6 +++--- src/vcpkg-test/hash.cpp | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/azure-pipelines/pipelines.yml b/azure-pipelines/pipelines.yml index e6613b61be..05bb484cde 100644 --- a/azure-pipelines/pipelines.yml +++ b/azure-pipelines/pipelines.yml @@ -41,7 +41,7 @@ jobs: displayName: 'Rush install, build and test vcpkg-ce' - bash: | export CXXFLAGS="-fprofile-arcs -ftest-coverage -fPIC -O0" - cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=ON -B build.amd64.debug + cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_BENCHMARKING=ON -DVCPKG_BUILD_FUZZING=ON -B build.amd64.debug make -j 2 -C build.amd64.debug displayName: "Build vcpkg with CMake" failOnStderr: true @@ -89,7 +89,7 @@ jobs: git -C "$VCPKG_ROOT" checkout `cat vcpkg-init/vcpkg-scripts-sha.txt` displayName: "Clone vcpkg repo to serve as root" - bash: | - cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=ON -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 -B build.amd64.debug + cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_BENCHMARKING=ON -DVCPKG_BUILD_FUZZING=ON -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 -B build.amd64.debug make -j 2 -C build.amd64.debug displayName: "Build vcpkg with CMake" failOnStderr: true @@ -126,7 +126,7 @@ jobs: script: | call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x86 -host_arch=x86 rmdir /s /q build.x86.debug > nul 2> nul - cmake.exe -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=ON -DVCPKG_BUILD_TLS12_DOWNLOADER=ON -B build.x86.debug + cmake.exe -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_BENCHMARKING=ON -DVCPKG_BUILD_FUZZING=ON -DVCPKG_BUILD_TLS12_DOWNLOADER=ON -B build.x86.debug ninja.exe -C build.x86.debug failOnStderr: true - script: build.x86.debug\vcpkg-test.exe diff --git a/src/vcpkg-test/files.cpp b/src/vcpkg-test/files.cpp index 4457026145..b056267af2 100644 --- a/src/vcpkg-test/files.cpp +++ b/src/vcpkg-test/files.cpp @@ -1071,18 +1071,18 @@ TEST_CASE ("remove all -- benchmarks", "[files][!benchmark]") void operator()(Catch::Benchmark::Chronometer& meter, std::uint32_t max_depth) const { - std::vector temp_dirs; + std::vector temp_dirs; temp_dirs.resize(meter.runs()); std::generate(begin(temp_dirs), end(temp_dirs), [&] { - path temp_dir = base_temporary_directory() / get_random_filename(urbg); + Path temp_dir = base_temporary_directory() / get_random_filename(urbg); create_directory_tree(urbg, fs, temp_dir, max_depth); return temp_dir; }); meter.measure([&](int run) { std::error_code ec; - path fp; + Path fp; const auto& temp_dir = temp_dirs[run]; fs.remove_all(temp_dir, ec, fp); diff --git a/src/vcpkg-test/hash.cpp b/src/vcpkg-test/hash.cpp index d18192b0f6..d0d1bf7a13 100644 --- a/src/vcpkg-test/hash.cpp +++ b/src/vcpkg-test/hash.cpp @@ -158,7 +158,7 @@ TEST_CASE ("SHA512: NIST test cases (large)", "[.][hash-expensive][sha512-expens #if defined(CATCH_CONFIG_ENABLE_BENCHMARKING) using Catch::Benchmark::Chronometer; -void benchmark_hasher(Chronometer& meter, Hash::Hasher& hasher, std::uint64_t size, unsigned char byte) noexcept +static void benchmark_hasher(Chronometer& meter, Hash::Hasher& hasher, std::uint64_t size, unsigned char byte) noexcept { unsigned char buffer[1024]; std::fill(std::begin(buffer), std::end(buffer), byte);