forked from FreeRDP/FreeRDP
-
Notifications
You must be signed in to change notification settings - Fork 0
Add a new test subdirectory
Pascal J. Bourguignon edited this page Jun 7, 2018
·
1 revision
- create the new test subdirectory in the module $m (eg. m='channels/smartcard/client'):
mkdir $m/test
- create the test source;
- create a $m/test/CMakeLists.txt file (take one from another test subdirectory as example).
- edit the target_link_libraries to add the library of the module you want to test. (eg. if the module to test is smartcard-client, add that):
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS} smartcard-client)
- edit the $m/CMakeLists.txt file in the parent directory, adding the test subdirectory to the buid:
if(BUILD_TESTING)
add_subdirectory(test)
endif()
```
That's it: Compile and run the tests!