Skip to content

Global Collections Reference

Collections are Ruby arrays and Rake FileLists (that act like arrays). Ceedling populates and assembles these by processing the project configuration, using internal knowledge, expanding path globs, etc. at startup.

Collections are globally available Ruby constants and are typically used in Rakefiles, plugins, and Ruby scripts where the contents tend to be especially handy for crafting custom functionality.

Collections are no longer a core component of Ceedling

As Ceedling has grown in sophistication and as many of its features now operate per test executable, the utility of and number of collections has dwindled.

Once upon a time, nearly all Ceedling actions happened in bulk and with the same collections used for all tasks. This is no longer true.

File collections

  • COLLECTION_PROJECT_OPTIONS:

    All project option files with path found in the configured options paths having the configured YAML file extension.

  • COLLECTION_ALL_TESTS:

    All files with path found in the configured test paths having the configured source file extension.

  • COLLECTION_ALL_ASSEMBLY:

    All files with path found in the configured source and test support paths having the configured assembly file extension.

  • COLLECTION_ALL_SOURCE:

    All files with path found in the configured source paths having the configured source file extension.

  • COLLECTION_ALL_HEADERS:

    All files with path found in the configured include, support, and test paths having the configured header file extension.

  • COLLECTION_ALL_SUPPORT:

    All files with path found in the configured test support paths having the configured source file extension.

Path collections

  • COLLECTION_PATHS_INCLUDE:

    All configured include paths.

  • COLLECTION_PATHS_SOURCE:

    All configured source paths.

  • COLLECTION_PATHS_SUPPORT:

    All configured support paths.

  • COLLECTION_PATHS_TEST:

    All configured test paths.

  • COLLECTION_PATHS_SOURCE_AND_INCLUDE:

    All configured source and include paths.

  • COLLECTION_PATHS_SOURCE_INCLUDE_VENDOR:

    All configured source and include paths plus applicable vendor paths (Unity's source path plus CMock and CException's source paths if mocks and exceptions are enabled).

  • COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE:

    All configured test, support, source, and include paths.

  • COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR:

    All test, support, source, include, and applicable vendor paths (Unity's source path plus CMock and CException's source paths if mocks and exceptions are enabled).

  • COLLECTION_PATHS_RELEASE_TOOLCHAIN_INCLUDE:

    All configured release toolchain include paths.

  • COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE:

    All configured test toolchain include paths.

  • COLLECTION_PATHS_VENDOR:

    Unity's source path plus CMock and CException's source paths if mocks and exceptions are enabled.

Build input collections

  • COLLECTION_RELEASE_BUILD_INPUT:

    • All files with path found in the configured source paths having the configured source file extension.
    • If exceptions are enabled, the source files for CException.
    • If assembly support is enabled, all assembly files found in the configured paths having the configured assembly file extension.
  • COLLECTION_EXISTING_TEST_BUILD_INPUT:

    • All files with path found in the configured source paths having the configured source file extension.
    • All files with path found in the configured test paths having the configured source file extension.
    • Unity's source files.
    • If exceptions are enabled, the source files for CException.
    • If mocks are enabled, the C source files for CMock.
    • If assembly support is enabled, all assembly files found in the configured paths having the configured assembly file extension.

    This collection does not include .c files generated by Ceedling and its supporting frameworks at build time (e.g. test runners and mocks). Further, this collection does not include source files added to a test executable's build list with the TEST_SOURCE_FILE() build directive macro.

Options and artifacts

  • COLLECTION_VENDOR_FRAMEWORK_SOURCES:

    Unity plus CMock, and CException's .c filenames (without paths) if mocks and exceptions are enabled.

  • COLLECTION_RELEASE_ARTIFACT_EXTRA_LINK_OBJECTS:

    If exceptions are enabled, CException's .c filenames (without paths) remapped to configured object file extension.

  • COLLECTION_TEST_FIXTURE_EXTRA_LINK_OBJECTS:

    All test support source filenames (without paths) remapped to configured object file extension.