From 2877c959e18a2b14f0f47a44ac10f56afc5ef7e9 Mon Sep 17 00:00:00 2001 From: Victor Vazquez Date: Mon, 29 Jun 2020 14:19:46 -0700 Subject: [PATCH] Enable storage unit tests (#227) * enable core unit tests to be compiled * Avoid running core unit tests in CI --- sdk/storage/ci.yml | 3 +- sdk/storage/test/CMakeLists.txt | 50 ++++++++++++++++----------------- 2 files changed, 26 insertions(+), 27 deletions(-) diff --git a/sdk/storage/ci.yml b/sdk/storage/ci.yml index 95dd142a7..763f89860 100644 --- a/sdk/storage/ci.yml +++ b/sdk/storage/ci.yml @@ -33,7 +33,8 @@ stages: - template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: ServiceDirectory: storage - CtestRegex: azure-storage + # TODO: Change to azure-storage once we have an strategy to run livetests or use test recordings + CtestRegex: azure-core Artifacts: - Name: azure-storage Path: . diff --git a/sdk/storage/test/CMakeLists.txt b/sdk/storage/test/CMakeLists.txt index 6575d30f9..07a1df13b 100644 --- a/sdk/storage/test/CMakeLists.txt +++ b/sdk/storage/test/CMakeLists.txt @@ -1,30 +1,28 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # SPDX-License-Identifier: MIT -### https://github.com/Azure/azure-sdk-for-cpp/issues/224 ### -#cmake_minimum_required (VERSION 3.15) -# -#add_executable ( -# azure-storage-test -# test_base.hpp -# test_base.cpp -# blob_service_client_test.cpp -# blob_container_client_test.hpp -# blob_container_client_test.cpp -# block_blob_client_test.hpp -# block_blob_client_test.cpp -# append_blob_client_test.hpp -# append_blob_client_test.cpp -# page_blob_client_test.hpp -# page_blob_client_test.cpp -# main.cpp -#) -# -#target_link_libraries(azure-storage-test PRIVATE azure-storage) -# -#if (MSVC) -# target_compile_options(azure-storage-test PRIVATE /wd6326 /wd26495 /wd26812) -#endif() -# -#add_gtest(azure-storage-test) +cmake_minimum_required (VERSION 3.15) +add_executable ( + azure-storage-test + test_base.hpp + test_base.cpp + blob_service_client_test.cpp + blob_container_client_test.hpp + blob_container_client_test.cpp + block_blob_client_test.hpp + block_blob_client_test.cpp + append_blob_client_test.hpp + append_blob_client_test.cpp + page_blob_client_test.hpp + page_blob_client_test.cpp + main.cpp +) + +target_link_libraries(azure-storage-test PRIVATE azure-storage) + +if (MSVC) + target_compile_options(azure-storage-test PRIVATE /wd6326 /wd26495 /wd26812) +endif() + +add_gtest(azure-storage-test)