Install CxxTest in your raspberryPI is fairly easy as you will just need to download the source code and then use the script: cxxtestgen to generate a .cpp
file and then compile this file.
To get the source code:
- Move to /usr/local directory (you can choose your own preference)
- Sudo git clone https://github.com/CxxTest/cxxtest.git
Try the first example in the CxxTest website:
http://cxxtest.com/guide.html#gettingStarted
Execute the cxxtestgen script. In my case the script is located in the /usr/local/cxxtest/bin.
/usr/local/cxxtest/bin/cxxtestgen --error-printer -o runner.cpp MyTestSuite1.h
(download your MyTestSuite1.h in the cxxtest website: http://cxxtest.com/guide.html#gettingStarted)
ls –a (You would see runner.cpp file.)
Then you would need to compile this file using:
g++ -I/usr/local/cxxtest runner.cpp –o runner
-I/usr/local/cxxtest is to tell where to file the include file in CxxTest.
If you do not have the correct include path, it will raise an error: g++: fatal error: no input files compilation terminated.
Finally, you can run your test: ./runner
- Move to /usr/local directory (you can choose your own preference)
- Sudo git clone https://github.com/CxxTest/cxxtest.git
Try the first example in the CxxTest website:
http://cxxtest.com/guide.html#gettingStarted
Execute the cxxtestgen script. In my case the script is located in the /usr/local/cxxtest/bin.
/usr/local/cxxtest/bin/cxxtestgen --error-printer -o runner.cpp MyTestSuite1.h
(download your MyTestSuite1.h in the cxxtest website: http://cxxtest.com/guide.html#gettingStarted)
ls –a (You would see runner.cpp file.)
Then you would need to compile this file using:
g++ -I/usr/local/cxxtest runner.cpp –o runner
-I/usr/local/cxxtest is to tell where to file the include file in CxxTest.
If you do not have the correct include path, it will raise an error: g++: fatal error: no input files compilation terminated.
Finally, you can run your test: ./runner
No comments:
Post a Comment