2018-01-17 16:37:34 -08:00
|
|
|
add_executable(tests
|
2019-01-25 09:16:23 -08:00
|
|
|
common/bit_field.cpp
|
2021-02-17 19:43:42 -08:00
|
|
|
common/cityhash.cpp
|
2020-02-05 10:13:16 -08:00
|
|
|
common/fibers.cpp
|
2021-06-05 00:16:32 -07:00
|
|
|
common/host_memory.cpp
|
2018-01-17 16:37:34 -08:00
|
|
|
common/param_package.cpp
|
2018-09-08 06:28:39 -07:00
|
|
|
common/ring_buffer.cpp
|
2021-03-31 21:03:25 -07:00
|
|
|
common/unique_function.cpp
|
2018-01-17 16:37:34 -08:00
|
|
|
core/core_timing.cpp
|
[network] Error handling reform
`network.cpp` has several error paths which either:
- report "Unhandled host socket error=n" and return `SUCCESS`, or
- switch on a few possible errors, log them, and translate them to
Errno; the same switch statement is copied and pasted in multiple
places in the code
Convert these paths to use a helper function `GetAndLogLastError`, which
is roughly the equivalent of one of the switch statements, but:
- handling more cases (both ones that were already in `Errno`, and a few
more I added), and
- using OS functions to convert the error to a string when logging, so
it'll describe the error even if it's not one of the ones in the
switch statement.
- To handle this, refactor the logic in `GetLastErrorMsg` to expose a
new function `NativeErrorToString` which takes the error number
explicitly as an argument. And improve the Windows version a bit.
Also, add a test which exercises two random error paths.
2021-01-24 12:17:02 -08:00
|
|
|
core/network/network.cpp
|
2018-01-17 16:37:34 -08:00
|
|
|
tests.cpp
|
2020-12-30 13:42:27 -08:00
|
|
|
video_core/buffer_base.cpp
|
2018-01-17 16:37:34 -08:00
|
|
|
)
|
2016-03-20 07:58:24 -07:00
|
|
|
|
2018-01-17 16:37:34 -08:00
|
|
|
create_target_directory_groups(tests)
|
2016-03-20 07:58:24 -07:00
|
|
|
|
2017-05-27 18:26:55 -07:00
|
|
|
target_link_libraries(tests PRIVATE common core)
|
2017-05-27 22:46:59 -07:00
|
|
|
target_link_libraries(tests PRIVATE ${PLATFORM_LIBRARIES} catch-single-include Threads::Threads)
|
2016-05-19 10:54:50 -07:00
|
|
|
|
2017-05-27 22:46:59 -07:00
|
|
|
add_test(NAME tests COMMAND tests)
|