Uploaded image for project: 'Qpid Proton'
  1. Qpid Proton
  2. PROTON-238

Initial CTest support

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • proton-0.3
    • None
    • proton-c
    • 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

          Activity

            People

              cliffjansen Clifford Jansen
              cliffjansen Clifford Jansen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: