{"id":21682273,"url":"https://github.com/jthelin/hello-ctest","last_synced_at":"2026-01-24T16:03:52.539Z","repository":{"id":218152246,"uuid":"745738547","full_name":"jthelin/hello-ctest","owner":"jthelin","description":"An example of using ctest for a C++ app / library.","archived":false,"fork":false,"pushed_at":"2024-10-18T23:08:52.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-12T12:19:07.538Z","etag":null,"topics":["cmake","cpp","ctest","hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jthelin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-01-20T02:03:21.000Z","updated_at":"2024-10-18T23:15:50.000Z","dependencies_parsed_at":"2024-01-20T03:26:30.371Z","dependency_job_id":"a8b3fbc4-dd63-4ee2-9c99-0d6392817675","html_url":"https://github.com/jthelin/hello-ctest","commit_stats":null,"previous_names":["jthelin/hello-ctest"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jthelin/hello-ctest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jthelin%2Fhello-ctest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jthelin%2Fhello-ctest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jthelin%2Fhello-ctest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jthelin%2Fhello-ctest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jthelin","download_url":"https://codeload.github.com/jthelin/hello-ctest/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jthelin%2Fhello-ctest/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28730746,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T10:24:43.181Z","status":"ssl_error","status_checked_at":"2026-01-24T10:24:36.112Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cmake","cpp","ctest","hacktoberfest"],"created_at":"2024-11-25T15:34:40.214Z","updated_at":"2026-01-24T16:03:52.521Z","avatar_url":"https://github.com/jthelin.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hello-ctest\n\n## Running build and test locally\n\nIn order to build and test this project locally, you need to follow 4 steps:\n\n1. **Create the _Build environment_**\n\n    Create a directory for all of the _generated_ files (e.g. make files, object files, executables etc.) will be located.\n    This can be done by running the command like:\n    ```shell\n    cmake -E make_directory my_build_directory\n    ```\n    or something system specific like:\n    ```shell\n    mkdir -p my_build_directory\n    ```\n\n2. **Configure CMake**\n\n    This step _generates_ all of the files needed for the build.\n    Navigate to `my_build_directory` and run:\n    ```shell\n    cmake ../\n    ```\n    Expected output:\n    ```\n    -- The CXX compiler identification is GNU 13.2.0\n    -- Detecting CXX compiler ABI info\n    -- Detecting CXX compiler ABI info - done\n    -- Check for working CXX compiler: /usr/bin/c++ - skipped\n    -- Detecting CXX compile features\n    -- Detecting CXX compile features - done\n    -- Using CTEST_RESOURCE_SPEC_FILE = some_path/hello-ctest/test-resource-spec.json\n    -- CMAKE_INSTALL_PREFIX = some_path/hello-ctest/my_build_directory/install/hello-ctest -- Use the cmake --install-prefix arg to override.\n    -- Configuring done (0.2s)\n    -- Generating done (0.0s)\n    -- Build files have been written to: some_path/hello-ctest/my_build_directory\n    ```\n\n3. **Build the project**\n\n    Navigate to `my_build_directory` and run:\n    ```shell\n    cmake --build .\n    ```\n    The output should look like:\n    ```\n    [ 50%] Building CXX object src/CMakeFiles/hello-ctest.dir/main.cpp.o\n    [100%] Linking CXX executable hello-ctest\n    [100%] Built target hello-ctest\n    ```\n\n4. **Execute the tests using `ctest`**\n\n    Tests in this project are expresed using [`ctest`](https://cmake.org/cmake/help/latest/manual/ctest.1.html).\n    To execute all of them navigate to `my_build_directory` and run:\n    ```\n    ctest\n    ```\n    The output should look like:\n    ```\n    Test project some_path/hello-ctest/my_build_directory\n        Start 1: run_hello-ctest\n    1/6 Test #1: run_hello-ctest ..................   Passed    0.00 sec\n        Start 2: Hello_One\n    2/6 Test #2: Hello_One ........................   Passed    0.00 sec\n        Start 3: Hello_Two\n    3/6 Test #3: Hello_Two ........................   Passed    0.00 sec\n        Start 4: Hello_Three\n    4/6 Test #4: Hello_Three ......................   Passed    0.00 sec\n        Start 5: Hello_Four\n    5/6 Test #5: Hello_Four .......................   Passed    0.00 sec\n        Start 6: Hello_Five\n    6/6 Test #6: Hello_Five .......................   Passed    0.00 sec\n\n    100% tests passed, 0 tests failed out of 6\n\n    Total Test time (real) =   0.02 sec\n    ```\n\nThese steps are reflected in [`build_and_test.yml`](.github/workflows/build_and_test.yml) workflow.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjthelin%2Fhello-ctest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjthelin%2Fhello-ctest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjthelin%2Fhello-ctest/lists"}