Skip to content

[Question] How do you do automated tests for emscripten builds using googletest? #23543

@mcbarton

Description

@mcbarton

I'm trying to add automated emscripten tests to a project I work on in a PR here compiler-research/CppInterOp#483 . I managed to get Google Test to successfully build and run without error on Emscripten as can be seen here https://github.com/compiler-research/CppInterOp/actions/runs/13006358705/job/36274044251#step:9:279 , but non of the tests appear in the Google Test run. Can someone provide me with a minimal example of how to use Google Test with Emscripten? The only example I have been able to find is here https://github.com/jprendes/emscripten-dylink-demo . It is a few years old and looks out of date since it uses the deprecated compiler setting RUNTIME_LINKED_LIBS . Looking for a more up to date example to guide me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions