{"id":45749101,"url":"https://github.com/epics-modules/gtest","last_synced_at":"2026-02-25T17:44:37.684Z","repository":{"id":142549680,"uuid":"256179102","full_name":"epics-modules/gtest","owner":"epics-modules","description":"The Google Test / Google Mock framework with full EPICS integration","archived":false,"fork":false,"pushed_at":"2025-01-03T18:49:59.000Z","size":1048,"stargazers_count":6,"open_issues_count":1,"forks_count":3,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-01-03T19:39:29.869Z","etag":null,"topics":["epics","epics-controls","googlemock","googletest","test-framework"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/epics-modules.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":"2020-04-16T10:13:30.000Z","updated_at":"2025-01-03T18:50:03.000Z","dependencies_parsed_at":"2025-01-03T19:35:42.510Z","dependency_job_id":"a3277f8b-9780-44bc-a742-fb44b3dd7aed","html_url":"https://github.com/epics-modules/gtest","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/epics-modules/gtest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epics-modules%2Fgtest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epics-modules%2Fgtest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epics-modules%2Fgtest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epics-modules%2Fgtest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/epics-modules","download_url":"https://codeload.github.com/epics-modules/gtest/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epics-modules%2Fgtest/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29832980,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T17:17:09.781Z","status":"ssl_error","status_checked_at":"2026-02-25T17:16:50.421Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["epics","epics-controls","googlemock","googletest","test-framework"],"created_at":"2026-02-25T17:44:35.328Z","updated_at":"2026-02-25T17:44:37.674Z","avatar_url":"https://github.com/epics-modules.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca target=\"_blank\" href=\"http://semver.org\"\u003e![Version][badge.version]\u003c/a\u003e\n\u003ca target=\"_blank\" href=\"https://github.com/epics-modules/gtest/actions/workflows/ci-scripts-build.yml\"\u003e![GitHub Actions status][badge.gha]\u003c/a\u003e\n\u003ca target=\"_blank\" href=\"https://ci.appveyor.com/project/epics-modules/gtest\"\u003e![AppVeyor status][badge.appveyor]\u003c/a\u003e\n\n# gtest - Google Test and Google Mock for EPICS\nThis module adds the [Google Test and Google Mock][googletest]\nframeworks to EPICS, fully supported and integrated with the EPICS\nbuild system.\n\n## Features\n\n-   Google Test and Google Mock 1.10.0, built with the EPICS build\n    system, thus using your specific configuration of EPICS Base,\n    compilers, host platforms etc.\n\n-   TAP listener to create test reports in the TAP standard that\n    EPICS uses.\n\n-   Additional rules for the EPICS build system that build and run\n    Google Test executables as part of the regular `make runtests` and\n    `make test-results` targets.\n\n-   Easy configuration in any EPICS Makefile;\n    EPICS unit tests and Google Tests can live in the same directory.\n\n-   Compatibility RULES file that allows using this module with older\n    releases of EPICS Base. (Tested for 3.14.12.8 and above.)\n\n## Prerequisites\n\n-   Recent versions of the EPICS 3.15 or EPICS 7 release series are\n    supported out-of-the-box. Using the provided compatibility rules\n    file, full functionality is available with older releases\n    (3.14.12.8 and above).\n\n-   Googletest 1.10.x requires a compiler that implements the C++11\n    standard. \\\n    Microsoft Visual C++ needs to be from Visual Studio 2015 or newer.\n    g++ needs to be 4.6 or above.\n\n## Usage\n\n1.  Configure the compiler on Linux to use the C++11 standard by adding\n    ```makefile\n    USR_CXXFLAGS_Linux += -std=c++11\n    ```\n    to the `CONFIG_SITE` file (or one of the host/target specific site\n    configuration files). \\\n    Under specific circumstances, it is not possible to link objects\n    together that have been compiled using different C++ standard\n    settings (see this [StackOverflow thread][stackoverflow.linking]).\n    In those cases, setting this option globally in EPICS Base is\n    preferable.\n\n2.  Build the gtest module using the standard techniques (e.g.,\n    configure the EPICS Base location through the `RELEASE.local`\n    mechanism).\n\n3.  Set `GTEST=/path/to/gtest/module` in your module's dependency\n    configuration (e.g., `RELEASE.local`).\n\n4.  Write test code in e.g. `myTest.cpp` (multiple test suites per\n    source file are supported) and add the test to the `Makefile`:\n\n```makefile\nGTESTPROD_HOST += myTest\nmyTest_SRCS += myTest.cpp\nGTESTS += myTest\n```\n\n5.  If you are using an older release of EPICS Base, include the\ncompatibility rules file at the end of your `Makefile`:\n\n```makefile\n-include $(GTEST)/cfg/compat.RULES_BUILD\n```\n\n6.  Run `make test-results`.\n\nWhen using the compatibility rules, you will see some warnings about\nmake rules for test related targets being overwritten and/or ignored.\nThis is expected, as it is the way the compatibility rules work:\nthey overwrite some of the test rules from EPICS Base to work with\nGoogle Test. This is done only for the make run in the directories\nwhere you include that compatibility rules file;\nyour Base installation (and all other/remaining builds) are left\nuntouched.\n\n## Embed gtest into an EPICS 7 Installation\n\nBuilding gtest as an embedded module inside an EPICS 7 installation\nis supported.\n\n1.  Put the gtest module into a subdirectory of `\u003cEPICS7\u003e/modules`, add\n    that subdirectory to `\u003cEPICS7\u003e/modules/Makefile.local`, switch the\n    compiler on Linux to the C++11 standard (see above) and recompile\n    Base.\n\n2.  Set `GTEST=$(EPICS_BASE)` in your module's dependency\n    configuration (e.g., `RELEASE.local`).\n\nThe remaining steps are the same as above.\n\n## License\n\nThe Google Test / Google Mock framework is distributed under the\n[3-Clause BSD License][license.bsd]. \\\nThe TAP listener is distributed under the [MIT License][license.mit]. \\\nEPICS is distributed under the [EPICS Open License][license.epics].\n\n\u003c!-- Links --\u003e\n[badge.version]: https://badge.fury.io/gh/epics-modules%2Fgtest.svg\n[badge.gha]: https://github.com/epics-modules/gtest/actions/workflows/ci-scripts-build.yml/badge.svg\n[badge.appveyor]: https://ci.appveyor.com/api/projects/status/0ei18dfxwkrq101o?svg=true\n\n[googletest]: https://github.com/google/googletest\n[stackoverflow.linking]: https://stackoverflow.com/questions/46746878/is-it-safe-to-link-c17-c14-and-c11-objects\n\n[license.bsd]: https://opensource.org/licenses/BSD-3-Clause\n[license.mit]: https://opensource.org/licenses/MIT\n[license.epics]: https://epics-controls.org/epics-open-license\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepics-modules%2Fgtest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fepics-modules%2Fgtest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepics-modules%2Fgtest/lists"}