We are currently using sonarqube on our c source file, so far we have used it with a build-wrapper that parsed our make command to create a json file.
But in a specific context we want to run sonarqube on some sources files without having any makefile. However we do have unit tests based on ceedling in that context. The problem is that ceedling doesn’t seems to use makefile but only ruby script to invoke gcc.
Is possible to do something like that, to use our build-wrapper we something other than a makefile? What does exactly the build-wrapper parse to create the .json file?
you can use build-wrapper with any command that invokes the compiler (as long as the compiler is supported). It can be an internal script, it doesn’t have to be a makefile. The only limitation is scripts that can only run on a daemon; they are not supported by build-wrapper.
So if your ruby script can be run without a daemon and invoke gcc, It should work with build-wrapper.
The ceedling command that you are using doesn’t rebuild if the files are not changed. the build-wrapper should be given a command that cleans build your code.
Can you try for the analysis to run the ceedling command that doesn’t run the test after doing a clean:
Please update your build-wrapper to 6.5 (instead of 4.14).
Let me know if you still face the failure after the update and if it still has the same logs.
Also, are you running the script from the project directory?
I updated the wrapper according to our server version and still got the exact same error:
Thu Dec 12 10:36:48 2019: build-wrapper, version 6.3 (win-x86-64)
Thu Dec 12 10:36:48 2019: isWow64: 0
Thu Dec 12 10:36:48 2019: windows version: 6.2, service pack: 0.0, build number: 9200, product type: 1
Thu Dec 12 10:36:48 2019: current directory: ***
Thu Dec 12 10:36:48 2019: command line received: <ceedling test:build_onlyl>
And yes we executing the script from the project directory. If we are executing this command ceedling test:build_only from the exact same place it works fine.
Try running ceedling like this: build-wrapper-win-x86-64.exe --out-dir my_dir ceedling.cmd clean test:build_only
You should run this from the project directory containing ceedling.cmd which run the ruby script.
It was just that you were missing the .cmd