Closed jyc-biz closed 1 year ago
Hi @jyc-biz!
I think the issue you are experiencing has nothing to do with the environment but instead with a probably broken/missing feature of Ceedling as you already found on #459.
Can you try with the following :tools
section and see if that works? You need to run Ceedling with more verbosity so the echoed test can be seen. e.g. ceedling verbosity[4] test
.
:tools:
:post_test:
:executable: echo
:arguments:
- Test done!
I've removed the :beep_on_done
tool because that does not conform to the Ceedling standard tool definition so it complains when trying to load that tool. That is the reason you are seeing the no implicit conversion of Symbol into Integer (TypeError)
error. Also, the :post_test
tool is specified as a hash and not as an array, because despite command_hooks plugin supporting an array of tools, Ceedling does not support that when loading the project configuration, so it complains when trying to do so and will lead also to the same error mentioned above.
Hey @deltalejo,
Thank you so much for clarifying! You are right, I removed the :environment: edits and it is still working fine. Turns out the higher verbosity is needed for echo to print out the text (i.e., ceedling verbosity[4] test
).
Is the plan to keep it this way? I noticed the higher verbosity also generated more messages while Ceedling runs, which makes the terminal a bit confusing to follow (that said I'm fine with that if that's the case).
By the way I also tried the pre_build command_hooks to run a Python script that I have. Seems like that is working fine as well.
Thanks again for your help!
@deltalejo, I noticed that with pre/post_build command_hooks even commands like ceedling version
would cause the hooks to be executed. Please let me know if this is expected behavior/I should open a separate issue.
Thanks!
@jyc-biz - Regarding the verbosity, I think the command_hooks plugin could be modified so it prints the command output directly instead of relaying on Ceedling's helper functions that do so taking into account the verbosity level.
@jyc-biz, It is expected behavior that the pre/post_build
hooks are called in that case. There is a doc about plugins that can give you an idea about when each hook is called, you can refer to the pre_build and post_build section. The doc contains some technical stuff that you can ignore if it is not of your concern.
Sounds great, thanks again for the clarifications!
Hey all,
I am trying to experiment with Ceedling's plugins.
However, I get the following error when I call ceedling:
After looking around online, I found #459 and this separate Google Groups thread that appear to discuss similar issues. My understanding is that specifying :tools: somehow overrides the default :environment:? Therefore, I should re-specify :environment: as below so that the current path is added back for Ceedling to find the necessary tools?
In addition to specifying :environment:, I also have the following in project.yml.
However, this now generates the error:
Seems like there is more that needs to be specified? Please correct any misunderstandings and thank you in advance for your time!