Details
-
New Feature
-
Status: Closed
-
Major
-
Resolution: Fixed
-
proton-0.3
-
None
-
None
-
Mainly proton-c and interop testing.
Description
This is a proposal for starting to use CMake's built in CTest capabilities in order to allow a unified test mechanism on multiple platforms.
For the supplied review patch, it assumes that instead of using trunk/config.sh and calling proton-test directly, you do:
cd path/to/trunk
mkdir build
cd build
cmake ..
make
ctest
Assuming the make succeeds, this will test two targets for now (proton-c and proton-jni), but the newer proposed tests (i.e. performance) can be added as well.
Once the desired work flow is captured, this can be tweaked to run in a platform neutral way. CMake even has the capability to run CTest from inside the Visual Studio IDE. Concepts and strategies are stolen from the qpid/cpp tree.
By default, you just get a brief summary of the tests. Also try
ctest -V [ to see the full output ]
ctest -N [ to list the available tests ]
ctest -R proton-c [ just run the one test in this case, or a regexp if supplied ]
ctest -E <regexp> [ run all tests except ones that match regexp ]
Fancier tests can use cmake scripts to do things in a platform neutral manner (move files around), run the test from a different directory, etc. Python scripts and Java programs are already platform neutral, so there is no need to make changes for those.
Tests can be conditionally configured (in the example proton-jni will not be configured if maven or java aren't found).
Note that if you wish to just build and test proton-c, there is no requirement to build from within the specific directory .../trunk/build. This restriction currently exists for testing proton-jni using maven, but perhaps that can be relaxed in future.
Attachments
Issue Links
- duplicates
-
PROTON-211 Non-maven users should have ability to run all system tests
- Closed