Skip to content

Tests don't work with -DEXTERNAL_CHIPDB=ON #1567

@GyrosGeier

Description

@GyrosGeier

When installing the chipdb to separate files, tests are looking for the files in the installed path, where they only exist if this or a previous version is already installed.

As a result, tests cannot run as part of a package build in a clean environment.

In an environment where the previous version is installed, the tests use the chipdb files from the previous version instead of the just-built ones.

As a horrible hack, it works with

    add_definitions("-DEXTERNAL_CHIPDB_ROOT=\"$<IF:$<STREQUAL:$<LIST:FILTER,$<TARGET_PROPERTY:NAME>,INCLUDE,.*-test>,>,${EXTERNAL_CHIPDB_ROOT},$<PATH:REMOVE_FILENAME,$<TARGET_PROPERTY:BINARY_DIR>>>\"")

in the toplevel CMakeLists. I think this solution is problematic for a lot of reasons, so it's not a pull request, but it would be cool to have a way to run tests reliably with -DEXTERNAL_CHIPDB=ON.

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