Hi ~ S
Are you asking about the cpputest-starter-project found on my GitHub account?
If so...
I suggest putting the framework in your repo so you can recreate a particular test runner. In a year, or two, for more you may need to look into a prior test executable. If the test framework is in your repo, you'll be able to. You do not have to follow this advice. Integrating the framework into your project directory may be helpful if you are doing a native test build. There are other ways to accomplish the same thing.
These days, I prefer using docker
. Docker helps to control the complete test build, including gcc and cpputest versions. You can see how that is done in the Dockerfile
in the cpputest-starter-project.
You can use my pre-built docker image jwgrenning/cpputest-runner
.
The structure is basically the same as you suggest, but missing the context of your project repo. The directory names
example-include
- example interface defining header filesexample-src
- example production source filesexample-platform
- example production source with platform dependenciesare chose to not interfere with already existing names you might be using like
<your-project-home>/include
- interface defining header files<your-project-home>/src
- production source files<your-project-home>/platform
- production source with platform dependenciesOnce you have the examples running, you can transition over to your directories.
Regarding your project directory, you should consider separating header files that define interfaces from the src
directory. If you ever need override an include file, you can't of the .h
file included in the .c
file are in the same directory. You should not need to do that often, but it is a good idea generally to separate interface from implementation.
You are right. Separate your product build from the test build.
I'll be updating the cpputest-starter-project README file, later today or tomorrow.
James
James Grenning -- Author of TDD for Embedded C
Join my live-via-the-web or self-paced TDD Training
wingman-sw.com -- blog -- @jwgrenning -- facebook
--
You received this message because you are subscribed to the Google Groups "cpputest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cpputest+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cpputest/7f6eea5b-b761-4afa-ab93-93a5c26145d6n%40googlegroups.com.