Skip to content

Add support of Zephyr OS - #4692

Open
anobli wants to merge 2 commits into
google:mainfrom
anobli:abailon/zephyr/dev
Open

anobli wants to merge 2 commits into
google:mainfrom
anobli:abailon/zephyr/dev

Conversation

@anobli

@anobli anobli commented Jan 8, 2025

Copy link
Copy Markdown

This updates googletest in order to use it with Zephyr.
The first patch update gtest itself to support Zephyr OS it self.
The second adds files used by Zephyr build system. If this is not acceptable, then I will drop it and find another way to integrate it to zephyr build system.

@google-cla

google-cla Bot commented Jan 8, 2025

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Comment thread modules/googletest/CMakeLists.txt Outdated
@anobli
anobli force-pushed the abailon/zephyr/dev branch 3 times, most recently from c767d2d to 53e0458 Compare February 10, 2025 15:22
@anobli
anobli requested a review from dkaszews February 10, 2025 15:26
Comment thread googletest/src/gtest_main.cc Outdated
@anobli
anobli force-pushed the abailon/zephyr/dev branch 2 times, most recently from ef017e6 to 8e3886a Compare February 11, 2025 08:50
@anobli
anobli requested a review from dkaszews February 11, 2025 08:50
@dkaszews

Copy link
Copy Markdown

What little I can review and understand looks good to me

@jeffwelder-ellenbytech

Copy link
Copy Markdown

+1

This is fantastic, and works great out of the box.
Attached is how I pulled it into my zephyr project.

manifest:
  remotes:
    - name: zephyrproject-rtos
      url-base: https://github.com/zephyrproject-rtos
    - name: anobli
      url-base: https://github.com/anobli

  projects:
    - name: googletest
      remote: anobli
      repo-path: googletest
      revision: 8e3886acac2e6058f4f540269f43b1f4a2700adc
    - name: zephyr
      remote: zephyrproject-rtos
      revision: v4.1.0
      import:
        name-blocklist:
          - hal_altera
          - hal_cypress
          - hal_infineon
          - hal_microchip
          - hal_nxp
          - hal_openisa
          - hal_silabs
          - hal_xtensa
          - hal_ti
          - loramac-node
          - ci-tools
          - edtt
          - sof
          - matter
  self:
    path: application

@awojasinski

Copy link
Copy Markdown

+1

@dkaszews can you merge it?

@dkaszews

dkaszews commented Aug 6, 2025

Copy link
Copy Markdown

@awojasinski I'm not a maintainer, I just reviewed it because I'd like to see it merged myself

@markus-schmailzl-bsh

Copy link
Copy Markdown

We are also really interested in the change. But we have the problem that the main zephyr thread is still running when the tests are executed. Does anybody else have this issue?

@thorsten-klein

thorsten-klein commented Dec 8, 2025 •

Copy link
Copy Markdown

Any updates on this? When will this be merged?

@anobli

anobli commented Dec 15, 2025

Copy link
Copy Markdown
Author

We are also really interested in the change. But we have the problem that the main zephyr thread is still running when the tests are executed. Does anybody else have this issue?

Could you elaborate more about the issue you are getting ?

@anobli
anobli force-pushed the abailon/zephyr/dev branch 5 times, most recently from 4fc5516 to 810173c Compare April 1, 2026 05:16
@anobli
anobli force-pushed the abailon/zephyr/dev branch 2 times, most recently from ad58b0b to 6e35d5a Compare May 21, 2026 06:42
@anobli
anobli force-pushed the abailon/zephyr/dev branch 3 times, most recently from fbbab9d to 3ae17db Compare May 31, 2026 06:50
@anobli
anobli force-pushed the abailon/zephyr/dev branch 6 times, most recently from c807b63 to 69d3445 Compare August 8, 2026 04:03
@anobli
anobli force-pushed the abailon/zephyr/dev branch 6 times, most recently from b0223d2 to 45baab9 Compare August 19, 2026 03:37
@anobli
anobli force-pushed the abailon/zephyr/dev branch 3 times, most recently from 5d0e09e to 0490ba7 Compare August 25, 2026 03:39
@anobli
anobli force-pushed the abailon/zephyr/dev branch 4 times, most recently from 6d245ea to 868f30e Compare September 3, 2026 07:29
@anobli
anobli force-pushed the abailon/zephyr/dev branch from 868f30e to b6ccdcf Compare September 4, 2026 07:31
Comment thread modules/modules.cmake

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ز

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

و

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ه

@anobli
anobli force-pushed the abailon/zephyr/dev branch 3 times, most recently from 974db4e to d10719c Compare September 11, 2026 07:35
@anobli
anobli force-pushed the abailon/zephyr/dev branch 2 times, most recently from 8452e39 to b127ac3 Compare September 18, 2026 07:44
@anobli
anobli force-pushed the abailon/zephyr/dev branch from b127ac3 to f0cbdb2 Compare October 1, 2026 09:35
anobli added 2 commits October 3, 2026 08:42
Although Zephyr has it own test suite, it doesn't work well with C++.
gtest and gmock seem more adapted.
This adds support of Zephyr OS in order to test C++ libraries and
applications.

Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
This update googletest to use it as Zephyr OS external module.
This allows downloading, configure and building googltest using
Zephyr west build system, without any user manipulation.

Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
@anobli
anobli force-pushed the abailon/zephyr/dev branch from f0cbdb2 to f00739f Compare October 3, 2026 08:42

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants