{"id":15040600,"url":"https://github.com/snikulov/google-test-examples","last_synced_at":"2025-04-06T03:09:57.515Z","repository":{"id":1513284,"uuid":"1770964","full_name":"snikulov/google-test-examples","owner":"snikulov","description":"Short example how to use Google Test with CMake project","archived":false,"fork":false,"pushed_at":"2023-12-31T13:56:28.000Z","size":26,"stargazers_count":273,"open_issues_count":0,"forks_count":78,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-03-30T02:07:16.287Z","etag":null,"topics":["c-plus-plus","cmake","cpp","docker-container","gtest"],"latest_commit_sha":null,"homepage":"","language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/snikulov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2011-05-19T11:52:40.000Z","updated_at":"2025-03-22T09:21:08.000Z","dependencies_parsed_at":"2024-09-20T18:10:37.887Z","dependency_job_id":"805e3e87-7639-4109-817a-08fbdb2b749b","html_url":"https://github.com/snikulov/google-test-examples","commit_stats":{"total_commits":33,"total_committers":9,"mean_commits":"3.6666666666666665","dds":"0.48484848484848486","last_synced_commit":"529112e35e91c336f98780509db716af864d831d"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snikulov%2Fgoogle-test-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snikulov%2Fgoogle-test-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snikulov%2Fgoogle-test-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snikulov%2Fgoogle-test-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/snikulov","download_url":"https://codeload.github.com/snikulov/google-test-examples/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247427006,"owners_count":20937201,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c-plus-plus","cmake","cpp","docker-container","gtest"],"created_at":"2024-09-24T20:44:47.906Z","updated_at":"2025-04-06T03:09:57.497Z","avatar_url":"https://github.com/snikulov.png","language":"CMake","readme":"# Short sample how-to use Google C++ Test Framework in cmakeable projects\n\n1. Google test will be downloaded from GitHub and built with your project\n\n## How to use:\n\n1. git clone https://github.com/snikulov/google-test-examples.git\n2. cd google-test-examples\n3. mkdir build\n4. cd build\n5. cmake ..\n6. cmake --build .\n7. ctest -VV\n\n## CI status:\n\n[![Build Status](https://travis-ci.org/snikulov/google-test-examples.svg?branch=master)](https://travis-ci.org/snikulov/google-test-examples) | [![Build status](https://ci.appveyor.com/api/projects/status/t30uakdk0awxy88p/branch/master?svg=true)](https://ci.appveyor.com/project/snikulov/google-test-examples/branch/master)\n\n## Known issues:\n\n- TBD\n---\n\n# How to use (alternativ with docker containers)\n\n## Get repo\n```bash\n$ git clone https://github.com/snikulov/google-test-examples.git\n$ cd google-test-examples\n```\n\n## CMake\nWe can use CMake to configure/build/running tests:\n\n### Host side\n```bash\n$ cmake -P build.cmake\n```\n\n### Docker Containers side\n```bash\ncmake -P build_with_docker.cmake\n```\n\n## Makefile\n\n### Targets\n```bash\n$ make [tab]\nmake all\nall                        build/Makefile             configure                  google-test-examples_test\nbuild                      clean                      DOCKER_COMMAND             run\nbuild_directory            clean_docker_image         docker_image\nbuild_docker_image         CMAKE_COMMAND              DOCKER_IMAGE\n```\n\n### Configure/Build/Running tests (with docker containers)\n```bash\n$ make all\ndocker build -t atty/google-test-examples:latest --file docker/Dockerfile .\nSending build context to Docker daemon  221.2kB\nStep 1/1 : FROM rikorose/gcc-cmake:latest\n...\n1/1 Test #1: test1 ............................   Passed    0.00 sec\n100% tests passed, 0 tests failed out of 1\n\nTotal Test time (real) =   0.00 sec\n```\n\n## Screencast recording\n[![asciicast](https://asciinema.org/a/a03v5lmsoph7l0lhish1jkwqo.png)](https://asciinema.org/a/a03v5lmsoph7l0lhish1jkwqo)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnikulov%2Fgoogle-test-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnikulov%2Fgoogle-test-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnikulov%2Fgoogle-test-examples/lists"}