Skip to content

Commit

Permalink
Core test (Azure#4006)
Browse files Browse the repository at this point in the history
* core tests

* clang

* vcpkg test

* dswsw

* first take on the vcpkg

* vcpkg

* get vcpkg version

* fix cmake

* separators

* vcpkg

* vcpkg

* test1

* disable verify agent od

* put back verify

* put back yml
  • Loading branch information
gearama authored Oct 14, 2022
1 parent 67d6bd1 commit 6fc0ba7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
3 changes: 2 additions & 1 deletion eng/pipelines/templates/jobs/perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ extends:
AdditionalArguments: ${{ parameters.AdditionalArguments }}
EnvVars: ${{ parameters.EnvVars}}
InstallLanguageSteps:
- template: /eng/pipelines/templates/steps/vcpkg-clone.yml
- template: /eng/pipelines/templates/steps/vcpkg.yml
#/eng/pipelines/templates/steps/vcpkg-clone.yml
parameters:
RepoOwner: Microsoft
10 changes: 9 additions & 1 deletion sdk/core/perf/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,16 @@ target_include_directories(
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/inc>
)

if(DEFINED ENV{VCPKG-AZURE-CORE-CPP})
find_package(azure-core-cpp $ENV{VCPKG-AZURE-CORE-CPP} EXACT)
add_compile_definitions(VCPKG_CORE_VERSION="$ENV{VCPKG-AZURE-CORE-CPP}")
else()
add_compile_definitions(VCPKG_CORE_VERSION="source")
endif()


# link the `azure-perf` lib together with any other library which will be used for the tests.
target_link_libraries(azure-perf-test PRIVATE azure-core azure-perf)
target_link_libraries(azure-perf-test PRIVATE Azure::azure-core azure-perf)
# Make sure the project will appear in the test folder for Visual Studio CMake view
set_target_properties(azure-perf-test PROPERTIES FOLDER "Tests/Core")

Expand Down
2 changes: 1 addition & 1 deletion sdk/core/perf/test/src/perf_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

int main(int argc, char** argv)
{

std::cout << "AZURE-CORE-CPP VERSION " << VCPKG_CORE_VERSION << std::endl;
// Create the test list
std::vector<Azure::Perf::TestMetadata> tests{
Azure::Perf::Test::NoOp::GetTestMetadata(),
Expand Down

0 comments on commit 6fc0ba7

Please sign in to comment.