# ========================================================================= # Ceedling - Test-Centered Build System for C # ThrowTheSwitch.org # Copyright (c) 2010-25 Mike Karlesky, Mark VanderVoord, & Greg Williams # SPDX-License-Identifier: MIT # ========================================================================= --- :project: # how to use ceedling. If you're not sure, leave this as `gem` and `?` :which_ceedling: gem :ceedling_version: '?' # optional features. If you don't need them, keep them turned off for performance :use_mocks: TRUE :use_test_preprocessor: :all # options are :none, :mocks, :tests, or :all :use_deep_preprocessor: :none # options are :none, :mocks, :tests, or :all :use_backtrace: :none # options are :none, :simple, or :gdb :use_decorators: :auto # decorate Ceedling's output text. options are :auto, :all, or :none # tweak the way ceedling handles automatic tasks :build_root: build :test_file_prefix: Test :default_tasks: - test:all # performance options. If your tools start giving mysterious errors, consider # dropping this to 1 to force single-tasking :test_threads: 8 :compile_threads: 8 # enable release build (more details in release_build section below) :release_build: FALSE # further details to configure the way Ceedling handles test code :test_build: :use_assembly: FALSE # further details to configure the way Ceedling handles release code :release_build: :output: MyApp.out :use_assembly: FALSE :artifacts: [] # Specify where to find mixins and any that should be enabled automatically :mixins: :enabled: [] :load_paths: - mixin # Plugins are optional Ceedling features which can be enabled. Ceedling supports # a variety of plugins which may effect the way things are compiled, reported, # or may provide new command options. Refer to the readme in each plugin for # details on how to use it. :plugins: :load_paths: [] :enabled: #- beep # beeps when finished, so you don't waste time waiting for ceedling - module_generator # handy for quickly creating source, header, and test templates #- gcov # test coverage using gcov. Requires gcc, gcov, and a coverage analyzer like gcovr #- bullseye # test coverage using bullseye. Requires bullseye for your platform #- command_hooks # write custom actions to be called at different points during the build process #- compile_commands_json_db # generate a compile_commands.json file #- dependencies # automatically fetch 3rd party libraries, etc. #- subprojects # managing builds and test for static libraries #- fake_function_framework # use FFF instead of CMock # Report options (You'll want to choose one stdout option, but may choose multiple stored options if desired) #- report_build_warnings_log #- report_tests_gtestlike_stdout #- report_tests_ide_stdout #- report_tests_log_factory - report_tests_pretty_stdout #- report_tests_raw_output_log #- report_tests_teamcity_stdout # Specify which reports you'd like from the log factory :report_tests_log_factory: :reports: - json - junit - cppunit - html # override the default extensions for your system and toolchain :extension: #:header: .h #:source: .c #:assembly: .s #:dependencies: .d #:object: .o :executable: .out #:testpass: .pass #:testfail: .fail #:subprojects: .a # This is where Ceedling should look for your source and test files. # see documentation for the many options for specifying this. :paths: :test: - +:test/** - -:test/support :source: - src/** :include: - src/** :support: - test/support :libraries: [] # You can even specify specific files to add or remove from your test # and release collections. Usually it's better to use paths and let # Ceedling do the work for you! :files: :test: [] :source: [] # Compilation symbols to be injected into builds # See documentation for advanced options: # - Test name matchers for different symbols per test executable build # - Referencing symbols in multiple lists using advanced YAML # - Specifiying symbols used during test preprocessing :defines: :test: '*': - TEST # Simple list option to add symbol 'TEST' to compilation of all files in all test executables 'TestUsartIntegrated.c': - TEST - TEST_USART_INTEGRATED_STRING=\"It's Awesome Time!\n\" :release: [] # Enable to inject name of a test as a unique compilation symbol into its respective executable build. :use_test_definition: FALSE # Configure additional command line flags provided to tools used in each build step :flags: :test: :compile: :TemperatureCalculator: - '-DSUPPLY_VOLTAGE=3.0' # Configuration Options specific to CMock. See CMock docs for details :cmock: :mock_prefix: Mock :when_no_prototypes: :warn :enforce_strict_ordering: TRUE :plugins: - :ignore - :callback :treat_as: uint8: HEX8 uint16: HEX16 uint32: UINT32 int8: INT8 bool: UINT8 # You can optionally have ceedling create environment variables for you before # performing the rest of its tasks. :environment: [] # :environment: # # List enforces order allowing later to reference earlier with inline Ruby substitution # - :var1: value # - :var2: another value # - :path: # Special PATH handling with platform-specific path separators # - #{ENV['PATH']} # Environment variables can use inline Ruby substitution # - /another/path/to/include # LIBRARIES # These libraries are automatically injected into the build process. Those specified as # common will be used in all types of builds. Otherwise, libraries can be injected in just # tests or releases. These options are MERGED with the options in supplemental yaml files. :libraries: :placement: :end :flag: "-l${1}" :path_flag: "-L ${1}" :system: - m :test: [] :release: [] ################################################################ # PLUGIN CONFIGURATION ################################################################ # Add -gcov to the plugins list to make sure of the gcov plugin # You will need to have gcov and gcovr both installed to make it work. # For more information on these options, see docs in plugins/gcov :gcov: :utilities: - gcovr # Use gcovr to create the specified reports (default). #- ReportGenerator # Use ReportGenerator to create the specified reports. :reports: # Specify one or more reports to generate. # Make an HTML summary report. - HtmlBasic # - HtmlDetailed # - Text # - Cobertura # - SonarQube # - JSON # - HtmlInline # - HtmlInlineAzure # - HtmlInlineAzureDark # - HtmlChart # - MHtml # - Badges # - CsvSummary # - Latex # - LatexSummary # - PngChart # - TeamCitySummary # - lcov # - Xml # - XmlSummary :gcovr: # :html_artifact_filename: TestCoverageReport.html # :html_title: Test Coverage Report :html_medium_threshold: 75 :html_high_threshold: 90 # :html_absolute_paths: TRUE # :html_encoding: UTF-8 # :module_generator: # :naming: :snake #options: :bumpy, :camel, :caps, or :snake # :includes: # :tst: [] # :src: []:module_generator: # :boilerplates: # :src: "" # :inc: "" # :tst: "" # :dependencies: # :libraries: # - :name: WolfSSL # :source_path: third_party/wolfssl/source # :build_path: third_party/wolfssl/build # :artifact_path: third_party/wolfssl/install # :fetch: # :method: :zip # :source: \\shared_drive\third_party_libs\wolfssl\wolfssl-4.2.0.zip # :environment: # - CFLAGS+=-DWOLFSSL_DTLS_ALLOW_FUTURE # :build: # - "autoreconf -i" # - "./configure --enable-tls13 --enable-singlethreaded" # - make # - make install # :artifacts: # :static_libraries: # - lib/wolfssl.a # :dynamic_libraries: # - lib/wolfssl.so # :includes: # - include/** # :subprojects: # :paths: # - :name: libprojectA # :source: # - ./subprojectA/source # :include: # - ./subprojectA/include # :build_root: ./subprojectA/build # :defines: [] # :command_hooks: # :pre_mock_preprocess: # :post_mock_preprocess: # :pre_test_preprocess: # :post_test_preprocess: # :pre_mock_generate: # :post_mock_generate: # :pre_runner_generate: # :post_runner_generate: # :pre_compile_execute: # :post_compile_execute: # :pre_link_execute: # :post_link_execute: # :pre_test_fixture_execute: # :post_test_fixture_execute: # :pre_test: # :post_test: # :pre_release: # :post_release: # :pre_build: # :post_build: # :post_error: ################################################################ # TOOLCHAIN CONFIGURATION ################################################################ #:tools: # Ceedling defaults to using gcc for compiling, linking, etc. # As [:tools] is blank, gcc will be used (so long as it's in your system path) # See documentation to configure a given toolchain for use # :tools: # :test_compiler: # :executable: # :arguments: [] # :name: # :optional: FALSE # :test_linker: # :executable: # :arguments: [] # :name: # :optional: FALSE # :test_assembler: # :executable: # :arguments: [] # :name: # :optional: FALSE # :test_fixture: # :executable: # :arguments: [] # :name: # :optional: FALSE # :test_includes_preprocessor: # :executable: # :arguments: [] # :name: # :optional: FALSE # :test_file_preprocessor: # :executable: # :arguments: [] # :name: # :optional: FALSE # :test_file_preprocessor_directives: # :executable: # :arguments: [] # :name: # :optional: FALSE # :release_compiler: # :executable: # :arguments: [] # :name: # :optional: FALSE # :release_linker: # :executable: # :arguments: [] # :name: # :optional: FALSE # :release_assembler: # :executable: # :arguments: [] # :name: # :optional: FALSE # :release_dependencies_generator: # :executable: # :arguments: [] # :name: # :optional: FALSE ...