Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion core/libs/prx/libSceAvPlayer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ if(BUILD_TESTING)
endif()
add_custom_target(avplayer_http_patched_closure)
add_dependencies(avplayer_http_patched_closure
libc libkernel libkernel_sys libSceLibcInternal libSceHttp libSceAvPlayer libSceAvPlayer.native nid_patcher)
libc libkernel libkernel_sys libSceLibcInternal libSceNetCtl libSceNet libSceSsl libSceHttp libSceAvPlayer libSceAvPlayer.native nid_patcher)
set(httpPatchedAllocatorArguments)
if(WIN32 AND TARGET mimalloc)
add_dependencies(avplayer_http_patched_closure mimalloc pe_import_first)
Expand All @@ -77,6 +77,9 @@ if(BUILD_TESTING)
-DKERNEL=$<TARGET_FILE:libkernel>
-DKERNEL_SYS=$<TARGET_FILE:libkernel_sys>
-DINTERNAL=$<TARGET_FILE:libSceLibcInternal>
-DNETCTL=$<TARGET_FILE:libSceNetCtl>
-DNET=$<TARGET_FILE:libSceNet>
-DSSL=$<TARGET_FILE:libSceSsl>
-DHTTP=$<TARGET_FILE:libSceHttp>
-DAVPLAYER=$<TARGET_FILE:libSceAvPlayer>
-DNATIVE=$<TARGET_FILE:libSceAvPlayer.native>
Expand Down
40 changes: 37 additions & 3 deletions core/libs/prx/libSceHttp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
add_library(libSceHttp SHARED EXCLUDE_FROM_ALL Export.cpp src/Options.cpp src/Parse.cpp src/Uri.cpp src/Client.cpp)
add_library(libSceHttp SHARED EXCLUDE_FROM_ALL Export.cpp src/Options.cpp src/Parse.cpp src/Uri.cpp src/Client.cpp src/Request.cpp src/Resolver.cpp)
target_include_directories(libSceHttp PRIVATE ${LIBS_INCLUDE_DIR})
target_sources(libSceHttp PRIVATE src/Cookies.cpp)
configure_windows_unwind(libSceHttp)
target_link_libraries(libSceHttp PRIVATE libSceNet libSceSsl)
if(WIN32)
target_link_libraries(libSceHttp PRIVATE ws2_32)
endif()
Expand Down Expand Up @@ -113,9 +114,41 @@ if(BUILD_TESTING)
endif()

if(BUILD_TESTING)
add_test_executable(guest_http_state_allocation_tests ${LIBS_INCLUDE_DIR}/tests/HttpStateAllocation.cpp Export.cpp src/Options.cpp src/Cookies.cpp src/Uri.cpp)
add_test_executable(guest_http_transport_context_allocation_tests
${LIBS_INCLUDE_DIR}/tests/HttpTransportContextAllocation.cpp
Export.cpp src/Options.cpp src/Parse.cpp src/Request.cpp src/Resolver.cpp src/Uri.cpp src/Cookies.cpp)
target_include_directories(guest_http_transport_context_allocation_tests PRIVATE
${LIBS_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/3rdparty/mbedtls/include)
target_link_libraries(guest_http_transport_context_allocation_tests PRIVATE libSceNet libSceSsl libkernel libc)
configure_windows_unwind(guest_http_transport_context_allocation_tests)
add_test(NAME guest_http_transport_context_allocation COMMAND guest_http_transport_context_allocation_tests)
set_tests_properties(guest_http_transport_context_allocation PROPERTIES TIMEOUT 30)
if(WIN32)
target_link_libraries(guest_http_transport_context_allocation_tests PRIVATE bcrypt ws2_32)
set_tests_properties(guest_http_transport_context_allocation PROPERTIES ENVIRONMENT_MODIFICATION
"PATH=path_list_prepend:$<TARGET_FILE_DIR:libSceHttp>")
endif()
endif()

if(BUILD_TESTING)
add_test_executable(guest_http_transport_tests ${LIBS_INCLUDE_DIR}/tests/networking/GuestHttpTransport.cpp)
target_include_directories(guest_http_transport_tests PRIVATE ${LIBS_INCLUDE_DIR} ${LIBS_INCLUDE_DIR}/tests ${CMAKE_SOURCE_DIR}/3rdparty/mbedtls/include)
target_link_libraries(guest_http_transport_tests PRIVATE libSceHttp libSceNet libSceSsl libc mbedtls mbedx509 mbedcrypto)
configure_windows_unwind(guest_http_transport_tests)
add_test(NAME guest_http_transport COMMAND guest_http_transport_tests)
set_tests_properties(guest_http_transport PROPERTIES TIMEOUT 30)
if(WIN32)
target_link_libraries(guest_http_transport_tests PRIVATE bcrypt ws2_32)
set_tests_properties(guest_http guest_http_uri_locale guest_http_response_header guest_http_options guest_http_transport PROPERTIES ENVIRONMENT_MODIFICATION
"PATH=path_list_prepend:$<TARGET_FILE_DIR:libSceHttp>")
endif()
endif()

if(BUILD_TESTING)
add_test_executable(guest_http_state_allocation_tests ${LIBS_INCLUDE_DIR}/tests/HttpStateAllocation.cpp Export.cpp src/Options.cpp src/Cookies.cpp src/Uri.cpp
src/Parse.cpp src/Request.cpp src/Resolver.cpp)
target_include_directories(guest_http_state_allocation_tests PRIVATE ${LIBS_INCLUDE_DIR})
target_link_libraries(guest_http_state_allocation_tests PRIVATE libc)
target_link_libraries(guest_http_state_allocation_tests PRIVATE libSceNet libSceSsl libkernel libc)
configure_windows_unwind(guest_http_state_allocation_tests)
add_test(NAME guest_http_state_init COMMAND guest_http_state_allocation_tests init)
add_test(NAME guest_http_state_init_live COMMAND guest_http_state_allocation_tests init-live)
Expand All @@ -127,6 +160,7 @@ if(BUILD_TESTING)
guest_http_state_term_1 guest_http_state_term_2 guest_http_state_term_3)
set_tests_properties(${httpStateTests} PROPERTIES TIMEOUT 20)
if(WIN32)
target_link_libraries(guest_http_state_allocation_tests PRIVATE bcrypt ws2_32)
set_tests_properties(${httpStateTests} PROPERTIES ENVIRONMENT_MODIFICATION
"PATH=path_list_prepend:$<TARGET_FILE_DIR:libc>")
endif()
Expand Down
Loading
Loading