-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setup binary and unit tests with GTest framework #13
Labels
user story
User story
Comments
10 tasks
doodspav
added a commit
that referenced
this issue
Mar 15, 2023
Signed-off-by: doodspav <[email protected]>
doodspav
added a commit
that referenced
this issue
Mar 18, 2023
Signed-off-by: doodspav <[email protected]>
doodspav
added a commit
that referenced
this issue
Mar 18, 2023
Signed-off-by: doodspav <[email protected]>
doodspav
added a commit
that referenced
this issue
Mar 18, 2023
Signed-off-by: doodspav <[email protected]>
Merged
doodspav
added a commit
that referenced
this issue
Mar 18, 2023
Signed-off-by: doodspav <[email protected]>
doodspav
added a commit
that referenced
this issue
Mar 18, 2023
Signed-off-by: doodspav <[email protected]>
doodspav
added a commit
that referenced
this issue
Mar 19, 2023
Signed-off-by: doodspav <[email protected]>
doodspav
added a commit
that referenced
this issue
Mar 21, 2023
- windows dependency file is generated per test kind, rather than once for all tests - all windows stuff is shifted either into test kind CMake file, or into create_test - create_test now accepts LINK parameters - create_test now uses the "name" parameter as the created target name Signed-off-by: doodspav <[email protected]>
doodspav
added a commit
that referenced
this issue
Mar 21, 2023
- also tests should have unique suite.name or CTest will skip "duplicates" Signed-off-by: doodspav <[email protected]>
doodspav
added a commit
that referenced
this issue
Mar 21, 2023
Signed-off-by: doodspav <[email protected]>
doodspav
added a commit
that referenced
this issue
Mar 21, 2023
create_test(BT example SOURCE example.cpp): - target created -> patomic_bt_example - executable created -> example(.exe) - executable installed as -> <prefix>/patomic/bt/example(.exe) Signed-off-by: doodspav <[email protected]>
doodspav
added a commit
that referenced
this issue
Mar 21, 2023
- only creates test targets that match the regex obtained from this option - the target name must match the regex; it is not tested against: - executable name - name passed to create_test - test suite/case name (this can be limited at runtime with gtest_filter) - look at create_test docs to see what target name is chosen Signed-off-by: doodspav <[email protected]>
doodspav
added a commit
that referenced
this issue
Mar 21, 2023
- also remove redundant example_add.cpp file Signed-off-by: doodspav <[email protected]>
doodspav
added a commit
that referenced
this issue
Mar 21, 2023
- when skipping creation of test due to not matching regex - when skipping creation of deps_path file due to no tests existing Signed-off-by: doodspav <[email protected]>
Merged
doodspav
added a commit
that referenced
this issue
Mar 22, 2023
…rriden - if BUILD_TESTING=OFF and patomic_BUILD_TESTING=ON, tests are built but not registered with CTest - need to call enable_testing() to get CTest to behave as expected Signed-off-by: doodspav <[email protected]>
doodspav
added a commit
that referenced
this issue
Mar 22, 2023
- disabled by default - determines whether windows_dependencies_path.txt is generated for tests or not Signed-off-by: doodspav <[email protected]>
doodspav
added a commit
that referenced
this issue
Mar 24, 2023
## Scope - create core test files (`test`) - setup CMake to build and install tests - each test has its own target as well as targets for test kind, and target for all tests - each test kind group is its own component and can be installed per component - all tests can also be installed together - path is automatically set for tests run with ctest on windows (unless disabled via option) - file containing path for test dependencies can be created on windows if option is enabled - tests can be built as a completely independent project - user can choose which tests to build using regex option --------- Signed-off-by: doodspav <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
test
folder with binary and unit tests (and any other tests) using GTest frameworkAcceptance Criteria
ctest .
runs all tests that were builtfind_package
find_package
The text was updated successfully, but these errors were encountered: