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