Created
July 17, 2016 21:41
-
-
Save austinglaser/cb91ba7bb864a2fc87f72e7dc838cd6e to your computer and use it in GitHub Desktop.
Basic configuration for Ceedling using the gcov plugin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# Notes: | |
# Sample project C code is not presently written to produce a release artifact. | |
# As such, release build options are disabled. | |
# This sample, therefore, only demonstrates running a collection of unit tests. | |
:project: | |
:use_exceptions: FALSE | |
:use_test_preprocessor: TRUE | |
:use_auxiliary_dependencies: TRUE | |
:use_deep_dependencies: TRUE | |
:test_file_prefix: test_ | |
:environment: | |
:extension: | |
:executable: .out | |
:paths: | |
:test: | |
- +:test/** | |
- -:test/support | |
:source: | |
- src/** | |
:support: | |
- test/support | |
:defines: | |
# in order to add common defines: | |
# 1) remove the trailing [] from the :common: section | |
# 2) add entries to the :common: section (e.g. :test: has TEST defined) | |
:common: &common_defines | |
- UNITY_SUPPORT_64 | |
:test: | |
- *common_defines | |
- TEST | |
- UNITY_FLOAT_VERBOSE | |
:test_preprocess: | |
- *common_defines | |
- TEST | |
- UNITY_FLOAT_VERBOSE | |
:cmock: | |
:mock_prefix: mock_ | |
:when_no_prototypes: :warn | |
:enforce_strict_ordering: TRUE | |
:includes: [] | |
:plugins: | |
- :ignore | |
- :ignore_arg | |
- :callback | |
- :return_thru_ptr | |
:treat_as: | |
uint8: HEX8 | |
uint16: HEX16 | |
uint32: UINT32 | |
int8: INT8 | |
bool: UINT8 | |
:flags: | |
:test: | |
:compile: | |
:*: | |
- -Wall | |
- -Wextra | |
- -Wstrict-prototypes | |
- -Werror | |
- -fdata-sections | |
- -ffunction-sections | |
- -m32 | |
:link: | |
:*: | |
- -flto | |
- -m32 | |
- -Wl,--gc-sections | |
# Note the extra set of flags for gcov here | |
:gcov: | |
:compile: | |
:*: | |
- -Wall | |
- -Wextra | |
- -Wstrict-prototypes | |
- -Werror | |
- -fdata-sections | |
- -ffunction-sections | |
- -m32 | |
:link: | |
:*: | |
- -m32 | |
- -Wl,--gc-sections | |
# I want to compile this particular project in 32-bit mode, which requires a | |
# custom *_linker tool configuration. | |
:tools: | |
:test_linker: | |
:executable: gcc | |
:arguments: | |
- ${1} | |
- -lm | |
- -o ${2} | |
:gcov_linker: | |
:executable: gcc | |
:arguments: | |
- -fprofile-arcs | |
- -ftest-coverage | |
- ${1} | |
- -lm | |
- -o ${2} | |
:plugins: | |
:load_paths: | |
- vendor/ceedling | |
:enabled: | |
- stdout_pretty_tests_report | |
- module_generator | |
- gcov | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment