Skip to content

Compile arduino_ci once as a linkable library and use for each test #227

Closed
@jgfoster

Description

@jgfoster

Each test is compiled with the mocks as a single compile/link operation. When there are many tests, this can take a bit of time. One possible optimization would be to compile arduino_ci once as a linkable library at the beginning and then link it with each subsequent test (which would compile more quickly).

In addition to the performance improvement, this would allow us to separate the process of building the mocks from the process of building the tests. In particular, this would allow us to use some C++ libraries and features when building the mocks that are not available when building the tests. That is, we want the tests to be built using an environment as close as possible to the Arduino CLI/IDE, but there isn't any reason (other than convenience) why we need to apply the same limits to the mocks. (This is a follow-up to #219.) (Linking different libraries from the same compiler should be safe.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    arduino mocksCompilation mocks for the Arduino libraryenhancementNew feature or requestunittest libsThe assert / assure / unittest reporting apparatus is affected

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions