1

I am trying to understand how "cmock"/"unity" works under the hood. Both of this are using ruby rake build tool. Is there an easy way to show/log all shell commands and its option that were invoked by rake during build? I would expect to see among other bunch of (or similar):

gcc a.c -o a.o -Wall -g -I"some/path"
gcc b.c -o b.o -Wall -g -I"some/path"

edit:
Some background to the question: I do not understand (yet) how rake and cmock works. So i thought: It would be great help if I can log how other programs (mainly compiler) were invoked by rake while building provided example. This way I can see process step by step without learning too much about reke/cmock just yet. (I have tried -t option but it does not show shell commands).

  • you should look at the `rakefile.rb`, and `rakefile_helper.rb` files as well as the related `.yml` file – Toby Nov 24 '16 at 15:35
  • @Toby Since I do not understand (yet) how rake and cmock works i thought: It would be great help if I can log how other programs (mainly compiler) were invoked by rake. I know that if I look on the rake configuration files I can deduce with what flags gcc was called. However what I I would be missing is order and any intermediate steps/files that are then later cleaned. (Mind you that I do not know rake - I am sure the rake expert would deduce this in no time from configs) – mazurnification Nov 25 '16 at 09:32
  • OK. I'm no Ruby coder but; if you find the `compile` method (ln #65 in Unity's `rakefile_helper.rb`) you can see the line that creates the `cmd_str` and one that `exectues()` it. Google tells me that printing stuff in Ruby is done with `puts()`. So add a `puts(cmd_str)` in there for your fixture and you should see the kind of output you want. Fingers crossed! – Toby Nov 25 '16 at 09:53
  • @Toby Thank you very much for suggestion - unfortunately I did not get test your approach - however if I ever will I will report result – mazurnification Dec 22 '16 at 15:24

0 Answers0