kandi X-RAY | cpputest Summary
kandi X-RAY | cpputest Summary
CppUTest unit testing and mocking framework for C/C++
Top functions reviewed by kandi - BETA
cpputest Key Features
cpputest Examples and Code Snippets
Trending Discussions on cpputest
I have a C/C++ project in which I want to use CppUTest. So I include the dependency of CppUTest with:...
ANSWERAnswered 2021-Aug-09 at 11:48
Do not use
*target* interfaces. If you do not want all stuff to be compiled with a specific option, do not set them globally. Instead:
I have a project which has a docker-compose file and a Dockerfile. The project is open here GitHub
I'm building a demo project with:
- Snort 3
- A NodeJS API dummy for testing
The issue is that in my Docker file I have a command like this to run on Snort...
ANSWERAnswered 2021-Jun-07 at 12:56
Your entrypoint is conflicting with the command you want to run:
When trying to run my makefile (https://pastebin.com/CYqsYtj9), I run into an error:...
ANSWERAnswered 2020-Jul-18 at 05:57
Well, as mentioned I'm no expert when it comes to Windows and I know even less about cygwin.
But, my suspicion is that the environment you're trying to use is not well-supported or well-tested on Windows. Here's what I see:
ANSWERAnswered 2020-Mar-09 at 19:44
Is there anything else I should consider adding to this, besides a clean rule?
TL;DR: You should pre-run ccptest's
autogen.sh script, and include all the resulting files in your distribution along with all the rest. You could then consider also omitting the rule for building
cpputest/configure (I would indeed omit it, myself).
Cpputest is apparently following a recent trend of omitting Autotools-generated files from source control. That makes sense on the surface, because those files can indeed be generated from others that are available from source control. It's fine from the perspective of a source control system being a project maintenance and development tool. It is not fine, however, with respect to source control used as a distribution tool.
One of the design goals of the Autotools is that they themselves are needed only by project maintainers. Running them is not intended to be part of a routine build process, such as someone who just wants to build and run the software would employ. Accordingly, distribution packages prepared by Autotools build systems themselves include all the needed bits to make that possible: the
configure script, supporting utility scripts,
Makefile.in files, and sometimes a few other miscellaneous files. This is the intended form for distribution.
This being the case, there is less compatibility pressure on the Autotools than there is on many projects, and indeed that manifests in weaker compatibility between different AT versions. If you build the build system with a different version of AT than the project maintainers themselves do, then you may encounter errors. You definitely will get a build system with some amount of difference from the one the maintainers use. Often the result will still build the project without issue, but sometimes not. So do yourself a favor and sidestep that issue.
Running this makefile does what I want but I am not sure how robust the dependencies are.
The makefile itself looks pretty good to me. The main things I see to criticize are
the rule for
cpputest/cpputest_build/Makefilespells out the directory part literally instead of using the
cpputesttarget's prerequisite list should not include either
$(CPPUTEST_BUILD_DIR)/Makefile. That these are required for the build process is incidental, and is already addressed by those artifacts being listed as prerequisites of the targets that depend directly on them. As a matter of style, maintainability, and general good practice,
makerules should list only targets' direct prerequisites.
Inasmuch as I am recommending that you distribute the build system components instead of making everyone rebuild them, however, I would also remove the rule for building
cpputest/configure. If you follow my advice then you'll distribute a pre-built one, so users won't need to build it. Omitting the rule and pulling
cpputest/configure from those prerequisite lists where it appears will eliminate a minor risk of everything falling over in the event that timestamps get scrambled, as can sometimes happen when a source tree gets copied.
As for a
clean rule, since you're doing cpputest configuration under control of the top-level
make, the corresponding way to clean would be to
cd $(CPPUTEST_BUILD_DIR); make distclean. However, since you're performing an out-of-source build, you also have the alternative of just recursively removing the build directory. Note, however, that if you persist with running
autogen.sh as part of your build process then the generated files are not restricted to the build directory. In that case, the corresponding clean would probably involve
No vulnerabilities reported
git clone git://github.com/cpputest/cpputest.git
autoreconf .. -i
Download latest version
Each TEST_GROUP may contain a setup and/or a teardown method. setup() is called prior to each TEST body and teardown() is called after the test body.
Each TEST_GROUP may contain a setup and/or a teardown method.
setup() is called prior to each TEST body and teardown() is called after the test body.
Reuse Trending Solutions
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page