mirror of https://github.com/microsoft/vcpkg.git
[test ports] minor cleanup (#44418)
This commit is contained in:
parent
b981f71bbe
commit
8867a9a7a1
|
|
@ -1,5 +1,8 @@
|
|||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
||||
file(INSTALL "${CURRENT_PORT_DIR}/test-macros.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
|
||||
if(NOT VCPKG_CROSSCOMPILING)
|
||||
file(INSTALL "${CURRENT_PORT_DIR}/test-macros.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
endif()
|
||||
|
||||
include("${CURRENT_PORT_DIR}/test-macros.cmake")
|
||||
|
||||
|
|
@ -35,6 +38,4 @@ if("execute-required-process" IN_LIST FEATURES)
|
|||
include("${CMAKE_CURRENT_LIST_DIR}/test-vcpkg_execute_required_process.cmake")
|
||||
endif()
|
||||
|
||||
if(Z_VCPKG_UNIT_TEST_HAS_ERROR)
|
||||
_message(FATAL_ERROR "At least one test failed")
|
||||
endif()
|
||||
unit_test_report_result()
|
||||
|
|
|
|||
|
|
@ -22,6 +22,13 @@ macro(message level msg)
|
|||
endif()
|
||||
endmacro()
|
||||
|
||||
# Call this at the end of testing.
|
||||
macro(unit_test_report_result)
|
||||
if(Z_VCPKG_UNIT_TEST_HAS_ERROR)
|
||||
_message(FATAL_ERROR "At least one test failed")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
set(Z_VCPKG_UNIT_TEST_HAS_ERROR OFF CACHE BOOL "" FORCE)
|
||||
unset_fatal_error()
|
||||
|
||||
|
|
|
|||
|
|
@ -198,3 +198,5 @@ Libs: -L${prefix}/lib -lgeneralinfod
|
|||
]])
|
||||
unit_test_ensure_success([[ vcpkg_fixup_pkgconfig(SKIP_CHECK) ]])
|
||||
unit_test_pkgconfig_check_key("debug;release" "Libs:" [[ "-L${prefix}/lib" -lgeneralinfod]])
|
||||
|
||||
file(REMOVE_RECURSE "${pc_file_release}" "${pc_file_debug}")
|
||||
|
|
|
|||
|
|
@ -160,3 +160,5 @@ unit_test_ensure_cmake_error([[
|
|||
set(CMAKE_REQUIRE_FIND_PACKAGE_absentPackageX 1)
|
||||
find_package(transitiveOptionalAbsentPackageX REQUIRED)
|
||||
]])
|
||||
|
||||
unit_test_report_result()
|
||||
|
|
|
|||
|
|
@ -20,3 +20,5 @@ endif()
|
|||
if("z-vcpkg-make-z-adapt-lib-link-names" IN_LIST FEATURES)
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/test-z_adapt_lib_link_names.cmake")
|
||||
endif()
|
||||
|
||||
unit_test_report_result()
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
"name": "vcpkg-ci-vcpkg-make",
|
||||
"version-string": "ci",
|
||||
"description": "Ensures that the vcpkg-make port functions are unit tested.",
|
||||
"license": "MIT",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "unit-test-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-make",
|
||||
"host": true
|
||||
}
|
||||
],
|
||||
"default-features": [
|
||||
"z-vcpkg-make-determine-arch",
|
||||
"z-vcpkg-make-determine-host-arch",
|
||||
"z-vcpkg-make-determine-target-arch",
|
||||
"z-vcpkg-make-prepare-compile-flags",
|
||||
"z-vcpkg-make-z-adapt-lib-link-names"
|
||||
],
|
||||
"features": {
|
||||
"z-vcpkg-make-determine-arch": {
|
||||
"description": "Test the z_vcpkg_make_determine_arch function"
|
||||
},
|
||||
"z-vcpkg-make-determine-host-arch": {
|
||||
"description": "Test the z_vcpkg_make_determine_host_arch function"
|
||||
},
|
||||
"z-vcpkg-make-determine-target-arch": {
|
||||
"description": "Test the z_vcpkg_make_determine_target_arch function"
|
||||
},
|
||||
"z-vcpkg-make-prepare-compile-flags": {
|
||||
"description": "Test the z_vcpkg_make_prepare_compile_flags function"
|
||||
},
|
||||
"z-vcpkg-make-z-adapt-lib-link-names": {
|
||||
"description": "Test the z_vcpkg_make_z_adapt_lib_link_names function"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
{
|
||||
"name": "vcpkg-make-tests",
|
||||
"version-string": "0",
|
||||
"description": "Ensures that the vcpkg-make port functions are unit tested.",
|
||||
"license": "MIT",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "unit-test-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-make",
|
||||
"host": true
|
||||
}
|
||||
],
|
||||
"default-features": [
|
||||
"z-vcpkg-make-prepare-compile-flags",
|
||||
"z-vcpkg-make-determine-arch",
|
||||
"z-vcpkg-make-determine-host-arch",
|
||||
"z-vcpkg-make-determine-target-arch",
|
||||
"z-vcpkg-make-z-adapt-lib-link-names"
|
||||
],
|
||||
"features": {
|
||||
"z-vcpkg-make-prepare-compile-flags": {
|
||||
"description": "Test the z_vcpkg_make_prepare_compile_flags function"
|
||||
},
|
||||
"z-vcpkg-make-determine-arch":{
|
||||
"description": "Test the z_vcpkg_make_determine_arch function"
|
||||
},
|
||||
"z-vcpkg-make-determine-host-arch":{
|
||||
"description": "Test the z_vcpkg_make_determine_host_arch function"
|
||||
},
|
||||
"z-vcpkg-make-determine-target-arch":{
|
||||
"description": "Test the z_vcpkg_make_determine_target_arch function"
|
||||
},
|
||||
"z-vcpkg-make-z-adapt-lib-link-names":{
|
||||
"description": "Test the z_vcpkg_make_z_adapt_lib_link_names function"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue