Not able to override build_root in options yml
We have several binaries generated from the same source code - different applications compiled for different boards. We need to test of these gnerated binaries for which we are planning to use options.
Since the binaries are diferent we also want to store the build output files to separate folder and I am trying to override the build_root option in the options yml, but it didnt seem to work.
project.yml
:project:
:use_exceptions: FALSE
:use_test_preprocessor: TRUE
:use_auxiliary_dependencies: TRUE
# :use_preprocessor_directives: TRUE
:options_paths:
# put variation yaml files into this folder
- project/options
# :build_root: build1
:test_file_prefix: test_
:which_ceedling: gem
:ceedling_version: 0.31.0
:default_tasks:
- test:all
and in the options app1_pcb1.yml
# Ceedling's auto tests for project.
:project:
:build_root: build2
:paths:
:test:
- +:test/**
- -:test/application/alarms/**
:source:
- -:../../application/application/scim/**
...
I tried uncommenting the build_root: from project.yml and I also tried using the relative path in app1_pcb1.yml as in :build_root: ../../build2 to make sure the build folder is at the root of the tests/ceedling level but no success.
There also seems to be very sparse documentation related to these topics - the advanced section seems to be empty at the moment.
I appreciate if you could provide any input and point out mistakes if any in the way I am trying to setup different build output folders.
I know that I can use project:<yaml_file_without_ext> but this will result in lots of duplication - I have around 30 different binaries generated with several different software feature flags which are built from a single repo / source code base.
I am also aware of the ticket where you had mentioned that overridding the built_root should work from next release. Either I am doing somethign wrong or its still not fixed yet.
ceedling --trace options:app1_pcb1 gcov:all utils:gcov
Test 'test_act_core.c'
rake aborted!
Errno::ENOENT: No such file or directory @ rb_sysopen - ../../build2/temp/_test_act_core.c
C:/MyPrograms/Ruby26-x64/bin/ceedling:23:in `load'
C:/MyPrograms/Ruby26-x64/bin/ceedling:23:in `<main>'
Tasks: TOP => gcov:all
(See full trace by running task with --trace)
ERROR: Ceedling Failed
Traceback (most recent call last):
4: from C:/MyPrograms/Ruby26-x64/lib/ruby/gems/2.6.0/gems/ceedling-0.31.1/plugins/gcov/lib/gcov.rb:135:in `block in <top (required)>'
3: from C:/MyPrograms/Ruby26-x64/lib/ruby/gems/2.6.0/gems/ceedling-0.31.1/lib/ceedling/cacheinator.rb:7:in `cache_test_config'
2: from C:/MyPrograms/Ruby26-x64/lib/ruby/gems/2.6.0/gems/ceedling-0.31.1/lib/ceedling/yaml_wrapper.rb:12:in `dump'
1: from C:/MyPrograms/Ruby26-x64/lib/ruby/gems/2.6.0/gems/ceedling-0.31.1/lib/ceedling/yaml_wrapper.rb:12:in `open'
C:/MyPrograms/Ruby26-x64/lib/ruby/gems/2.6.0/gems/ceedling-0.31.1/lib/ceedling/yaml_wrapper.rb:12:in `initialize': No such file or directory @ rb_sysopen - ../../build2/test/cache/input.yml (Errno::ENOENT)
Installed version
ceedling version Ceedling:: 0.31.1 Unity:: 2.5.4 CMock:: 2.5.4 CException:: 1.3.3
I'm also having this issue.
First, I apologize for the sparse documentation. That is something we definitely need to improve.
The build_root setting isn't a compiler option, it's a project setting change. Therefore it's not overwritten when changing the options menu. Instead, you want to merge in a complete different set of settings. You do this by calling ceedling with a different project yaml file. It will still load your original project.yml first, and then overwrite any parts that you replace in the new project yaml file.
For example:
ceedling project:app1_pcb1 gcov:all utils:gcov