2018-01-18 00:37:34 +00:00
|
|
|
add_executable(tests
|
2019-01-25 17:16:23 +00:00
|
|
|
common/bit_field.cpp
|
2021-02-18 03:43:42 +00:00
|
|
|
common/cityhash.cpp
|
2020-02-05 18:13:16 +00:00
|
|
|
common/fibers.cpp
|
2021-06-05 07:16:32 +00:00
|
|
|
common/host_memory.cpp
|
2018-01-18 00:37:34 +00:00
|
|
|
common/param_package.cpp
|
2018-09-08 13:28:39 +00:00
|
|
|
common/ring_buffer.cpp
|
2021-04-01 04:03:25 +00:00
|
|
|
common/unique_function.cpp
|
2018-01-18 00:37:34 +00: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 20:17:02 +00:00
|
|
|
core/network/network.cpp
|
2018-01-18 00:37:34 +00:00
|
|
|
tests.cpp
|
2020-12-30 21:42:27 +00:00
|
|
|
video_core/buffer_base.cpp
|
2018-01-18 00:37:34 +00:00
|
|
|
)
|
2016-03-20 14:58:24 +00:00
|
|
|
|
2018-01-18 00:37:34 +00:00
|
|
|
create_target_directory_groups(tests)
|
2016-03-20 14:58:24 +00:00
|
|
|
|
2017-05-28 01:26:55 +00:00
|
|
|
target_link_libraries(tests PRIVATE common core)
|
2017-05-28 05:46:59 +00:00
|
|
|
target_link_libraries(tests PRIVATE ${PLATFORM_LIBRARIES} catch-single-include Threads::Threads)
|
2016-05-19 17:54:50 +00:00
|
|
|
|
2017-05-28 05:46:59 +00:00
|
|
|
add_test(NAME tests COMMAND tests)
|