Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ceedling Upgrade from 0.31.1 to 1.0.1 #1024

Open
minne2021 opened this issue Feb 18, 2025 · 5 comments
Open

Ceedling Upgrade from 0.31.1 to 1.0.1 #1024

minne2021 opened this issue Feb 18, 2025 · 5 comments

Comments

@minne2021
Copy link

minne2021 commented Feb 18, 2025

My existing project uses Ceedling V0.31.1 and works fine. I need to upgrade it to Ceedling V1.0.1.

My issue is on the plugin "warnings_report". It looks like V1.0.1 changes its name to "report_build_warnings_log". I enabled it in my project.yml:

:plugins:
  :load_paths: []
  :enabled:
    - module_generator
    - report_tests_pretty_stdout
    - gcov
    - report_build_warnings_log

But I got error message when running Ceedling:

🪲 ERROR: Exception raised in plugin report_build_warnings_log within build hook :post_test_preprocess
🧨 EXCEPTION: undefined method `[]' for nil:NilClass

Are there anything I need to do to fix this issue? Thanks!

@mvandervoord
Copy link
Member

Hi @minne2021 -- it'd be helpful to see the full error. Can you rerun ceedling with -v=5 so it gives more verbose output? Then, if you past the error with the stack trace here, you can make a code block that won't get wonky formatting by adding a line with three backticks on a blank line BEFORE and AFTER your code:

// The line above this is ```
  // Other stuff
// The line below this is also ```

@minne2021
Copy link
Author

minne2021 commented Feb 19, 2025

Thank you @mvandervoord. I use docker image in my CICD pipeline configuration file (.gitlab-ci.yml). The Ceedling was installed in this docker image container. I ran "ceedling test:all --verbosity debug" in .gitlab-ci.yml. file and got a very long log. Here is part of the log with more information about the error:

👟 Mocking
----------
👟 Preprocessing Test Files
---------------------------
Preprocessing test_LIB_Support.c...
Loading #include statement listing file for test_LIB_Support.c...
Loaded existing #include list from build/test/preprocess/includes/test_LIB_Support/test_LIB_Support.c.yml:
 - build/vendor/unity/src/unity.h
 - src/COR_SystemHeader.h
 - src/LIB_Support.c
Command: {:name=>"default_test_file_full_preprocessor", :executable=>"gcc", :options=>{}, :line=>"gcc -E -I\"build/test/mocks/test_LIB_Support\" -I\"test/support\" -I\"src\" -I\"build/vendor/unity/src\" -I\"build/vendor/cmock/src\" -D\"__ramfunc=\"\"\" -D\"UBaseType_t=unsigned\\ long\" -D\"__STATIC_INLINE=static\\ inline\" -D\"CMOCK_MEM_DYNAMIC\" -D\"TEST_CEEDLING\" -DGNU_COMPILER -x c \"test/test_LIB_Support.c\" -o \"build/test/preprocess/files/test_LIB_Support/full_expansion/test_LIB_Support.c\""}
> Shell executed command:
`gcc -E -I"build/test/mocks/test_LIB_Support" -I"test/support" -I"src" -I"build/vendor/unity/src" -I"build/vendor/cmock/src" -D"__ramfunc=""" -D"UBaseType_t=unsigned\ long" -D"__STATIC_INLINE=static\ inline" -D"CMOCK_MEM_DYNAMIC" -D"TEST_CEEDLING" -DGNU_COMPILER -x c "test/test_LIB_Support.c" -o "build/test/preprocess/files/test_LIB_Support/full_expansion/test_LIB_Support.c"`
> With $stdout: <empty>
> With $stderr: <empty>
> And terminated with status: pid 29 exit 0
#<Thread:0x00007f66a43b1660 /usr/local/bundle/gems/ceedling-1.0.1/lib/ceedling/build_batchinator.rb:54 run> terminated with exception (report_on_exception is true):
/usr/local/bundle/gems/ceedling-1.0.1/plugins/report_build_warnings_log/lib/report_build_warnings_log.rb:51:in `post_test_preprocess': undefined method `[]' for nil:NilClass (NoMethodError)
	from /usr/local/bundle/gems/ceedling-1.0.1/lib/ceedling/plugin_manager.rb:124:in `block in execute_plugins'
	from /usr/local/bundle/gems/ceedling-1.0.1/lib/ceedling/plugin_manager.rb:119:in `each'
	from /usr/local/bundle/gems/ceedling-1.0.1/lib/ceedling/plugin_manager.rb:119:in `execute_plugins'
	from /usr/local/bundle/gems/ceedling-1.0.1/lib/ceedling/plugin_manager.rb:79:in `post_test_preprocess'
	from /usr/local/bundle/gems/ceedling-1.0.1/lib/ceedling/preprocessinator.rb:210:in `preprocess_test_file'
	from /usr/local/bundle/gems/ceedling-1.0.1/lib/ceedling/test_invoker.rb:267:in `block (2 levels) in setup_and_invoke'
	from /usr/local/bundle/gems/ceedling-1.0.1/lib/ceedling/build_batchinator.rb:61:in `block (5 levels) in exec'
	from /usr/local/bundle/gems/ceedling-1.0.1/lib/ceedling/build_batchinator.rb:59:in `loop'
	from /usr/local/bundle/gems/ceedling-1.0.1/lib/ceedling/build_batchinator.rb:59:in `block (4 levels) in exec'
	from /usr/local/bundle/gems/ceedling-1.0.1/lib/ceedling/build_batchinator.rb:57:in `handle_interrupt'
	from /usr/local/bundle/gems/ceedling-1.0.1/lib/ceedling/build_batchinator.rb:57:in `block (3 levels) in exec'
	from /usr/local/bundle/gems/ceedling-1.0.1/lib/ceedling/build_batchinator.rb:55:in `handle_interrupt'
	from /usr/local/bundle/gems/ceedling-1.0.1/lib/ceedling/build_batchinator.rb:55:in `block (2 levels) in exec'
Command: {:name=>"default_test_file_directives_only_preprocessor", :executable=>"gcc", :options=>{}, :line=>"gcc -E -I\"build/test/mocks/test_LIB_Support\" -I\"test/support\" -I\"src\" -I\"build/vendor/unity/src\" -I\"build/vendor/cmock/src\" -D\"__ramfunc=\"\"\" -D\"UBaseType_t=unsigned\\ long\" -D\"__STATIC_INLINE=static\\ inline\" -D\"CMOCK_MEM_DYNAMIC\" -D\"TEST_CEEDLING\" -DGNU_COMPILER -x c -fdirectives-only \"test/test_LIB_Support.c\" -o \"build/test/preprocess/files/test_LIB_Support/directives_only/test_LIB_Support.c\""}
> Shell executed command:
`gcc -E -I"build/test/mocks/test_LIB_Support" -I"test/support" -I"src" -I"build/vendor/unity/src" -I"build/vendor/cmock/src" -D"__ramfunc=""" -D"UBaseType_t=unsigned\ long" -D"__STATIC_INLINE=static\ inline" -D"CMOCK_MEM_DYNAMIC" -D"TEST_CEEDLING" -DGNU_COMPILER -x c -fdirectives-only "test/test_LIB_Support.c" -o "build/test/preprocess/files/test_LIB_Support/directives_only/test_LIB_Support.c"`
> With $stdout: <empty>
> With $stderr: <empty>
> And terminated with status: pid 31 exit 0
🪲 ERROR: Exception raised in plugin `report_build_warnings_log` within build hook :post_test_preprocess
🧨 EXCEPTION: undefined method `[]' for nil:NilClass
🌱 Ceedling could not complete operations because of errors
Plugin | ReportBuildWarningsLog > :post_test_preprocess...
Debug Backtrace ==>
/usr/local/bundle/gems/ceedling-1.0.1/plugins/report_build_warnings_log/lib/report_build_warnings_log.rb:51:in `post_test_preprocess': (NoMethodError)
	/usr/local/bundle/gems/ceedling-1.0.1/lib/ceedling/plugin_manager.rb:124:in `block in execute_plugins'
	/usr/local/bundle/gems/ceedling-1.0.1/lib/ceedling/plugin_manager.rb:119:in `each'
	/usr/local/bundle/gems/ceedling-1.0.1/lib/ceedling/plugin_manager.rb:119:in `execute_plugins'
	/usr/local/bundle/gems/ceedling-1.0.1/lib/ceedling/plugin_manager.rb:79:in `post_test_preprocess'
	/usr/local/bundle/gems/ceedling-1.0.1/lib/ceedling/preprocessinator.rb:210:in `preprocess_test_file'
	/usr/local/bundle/gems/ceedling-1.0.1/lib/ceedling/test_invoker.rb:267:in `block (2 levels) in setup_and_invoke'
	/usr/local/bundle/gems/ceedling-1.0.1/lib/ceedling/build_batchinator.rb:61:in `block (5 levels) in exec'
	/usr/local/bundle/gems/ceedling-1.0.1/lib/ceedling/build_batchinator.rb:59:in `loop'
	/usr/local/bundle/gems/ceedling-1.0.1/lib/ceedling/build_batchinator.rb:59:in `block (4 levels) in exec'
	/usr/local/bundle/gems/ceedling-1.0.1/lib/ceedling/build_batchinator.rb:57:in `handle_interrupt'
	/usr/local/bundle/gems/ceedling-1.0.1/lib/ceedling/build_batchinator.rb:57:in `block (3 levels) in exec'
	/usr/local/bundle/gems/ceedling-1.0.1/lib/ceedling/build_batchinator.rb:55:in `handle_interrupt'
	/usr/local/bundle/gems/ceedling-1.0.1/lib/ceedling/build_batchinator.rb:55:in `block (2 levels) in exec'
Plugin | ReportBuildWarningsLog > :post_error...
Running Warnings Report
-----------------------
Build produced no warnings.
Cleaning up project directory and file based variables
00:01
ERROR: Job failed: exit code 1

@minne2021
Copy link
Author

minne2021 commented Feb 20, 2025 via email

@mvandervoord
Copy link
Member

Hi @minne2021 -- thanks for checking in! I

@mvandervoord mvandervoord reopened this Feb 20, 2025
@minne2021
Copy link
Author

I run "ceedling test:all" with the Ceedling example project (temp_sensor) and got the same issue after I enabled report_build_warnings_log plugin from project.yml.

By the way, in this example project, TestUsartIntegrated.c includes "calculators/MockUsartBaudRateRegisterCalculator.h". But this header file is not in calculators directory. I have to remove "calculators/" to make Ceedling continue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants