Hi,
I am following
this example to run a command before the test starts. I tried the following example but replaced "post" with "pre":
:tools:
:pre_test:
- :executable: echo
:arguments: "${1} was glorious!"
- :executable: echo
:arguments:
- it kinda made me cry a little.
- you?
But the test the doesn't "compile":
Traceback (most recent call last):
9: from /usr/local/bin/ceedling:23:in `<main>'
8: from /usr/local/bin/ceedling:23:in `load'
7: from /var/lib/gems/2.5.0/gems/ceedling-0.31.0/bin/ceedling:329:in `<top (required)>'
6: from /var/lib/gems/2.5.0/gems/ceedling-0.31.0/lib/ceedling.rb:66:in `load_project'
5: from /var/lib/gems/2.5.0/gems/ceedling-0.31.0/lib/ceedling.rb:66:in `load'
4: from /var/lib/gems/2.5.0/gems/ceedling-0.31.0/lib/ceedling/rakefile.rb:47:in `<top (required)>'
3: from /var/lib/gems/2.5.0/gems/ceedling-0.31.0/lib/ceedling/setupinator.rb:29:in `do_setup'
2: from /var/lib/gems/2.5.0/gems/ceedling-0.31.0/lib/ceedling/configurator.rb:132:in `tools_setup'
1: from /var/lib/gems/2.5.0/gems/ceedling-0.31.0/lib/ceedling/configurator.rb:132:in `each_key'
/var/lib/gems/2.5.0/gems/ceedling-0.31.0/lib/ceedling/configurator.rb:136:in `block in tools_setup': no implicit conversion of Symbol into Integer (TypeError)
From a different thread in this forums I was suggested a different syntax, like this:
:pre_test:
:executable: echo
:arguments:
- "test123"
It runs, and I see "Running Hook pre_test..." when running ceedling, but there is no echo output. I have created a script called link_gen.sh in the project folder and added the following to the project file:
:pre_test:
:executable: link_gen.sh
But then it does not work as Ceedling seems to not see the script:
/var/lib/gems/2.5.0/gems/ceedling-0.31.0/lib/ceedling/system_wrapper.rb:25: warning: Insecure world writable dir /opt/microchip/xc16/v1.41/bin in PATH, mode 040777
ERROR: Config filepath [:tools][:pre_test][:executable]['link_gen.sh'] does not exist in system search paths.
Traceback (most recent call last):
7: from /usr/local/bin/ceedling:23:in `<main>'
6: from /usr/local/bin/ceedling:23:in `load'
5: from /var/lib/gems/2.5.0/gems/ceedling-0.31.0/bin/ceedling:329:in `<top (required)>'
4: from /var/lib/gems/2.5.0/gems/ceedling-0.31.0/lib/ceedling.rb:66:in `load_project'
3: from /var/lib/gems/2.5.0/gems/ceedling-0.31.0/lib/ceedling.rb:66:in `load'
2: from /var/lib/gems/2.5.0/gems/ceedling-0.31.0/lib/ceedling/rakefile.rb:47:in `<top (required)>'
1: from /var/lib/gems/2.5.0/gems/ceedling-0.31.0/lib/ceedling/setupinator.rb:32:in `do_setup'
/var/lib/gems/2.5.0/gems/ceedling-0.31.0/lib/ceedling/configurator.rb:304:in `validate': unhandled exception
If I were to add the directory to the project file so Ceedling can see it- how to do that? I would appreciate all help.