Skip to content

Project configuration :defines: can be confusing, when using :mixins: with additional defines #984

@mikewzr

Description

@mikewzr

When upgrading to Ceedling 1.0.0, i recognized some strange behavior in the Ceedling :defines: config section. There are two ways to specify definies that apply to all the test files:

:defines:
  :test:
    - UNIT_TEST
    - CONFIG_IDF_TARGET_LINUX

and 2)

:defines:
  :test:
    :*:
      - UNIT_TEST
      - CONFIG_IDF_TARGET_LINUX

I additionally have a mixin, just specifying some additional variables for single tests:

:defines:
  :test:
    :test_DBC_single_lookup_table:
      - UNIT_TEST_DBC_SINGLE_LT
    :test_DBC_idx_val_lookup_table:
      - UNIT_TEST_DBC_IDX_VAL_LT
    :test_DBC_idx_format_lookup_table:
      - UNIT_TEST_DBC_IDX_FORMAT_LT

The problem is, when using variant 1), the specific defines of the mixins do not apply. Ceedling does ignore them without any warning. Everything works as expected, when using variant 2).
I think the best thing would be, to remove variant 1) completely. If that breaks to much existing configs, at least a warning would necessary to warn the users about this behavior.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Backlog

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions