From 961254e848981f4a1e7303570e3308e041a0effb Mon Sep 17 00:00:00 2001 From: Michael Carroll Date: Fri, 5 Jun 2020 11:09:30 -0500 Subject: [PATCH] Disable long-running buildsystem tests by default (#97) (#100) Co-authored-by: Louise Poubel Co-authored-by: Steve Peters Signed-off-by: Michael Carroll --- .github/workflows/ci-bionic.yml | 1 + CMakeLists.txt | 6 ++++++ Changelog.md | 5 +++++ README.md | 2 ++ 4 files changed, 14 insertions(+) diff --git a/.github/workflows/ci-bionic.yml b/.github/workflows/ci-bionic.yml index 3f946408..19cc0848 100644 --- a/.github/workflows/ci-bionic.yml +++ b/.github/workflows/ci-bionic.yml @@ -14,4 +14,5 @@ jobs: uses: ignition-tooling/ubuntu-bionic-ci-action@master with: apt-dependencies: 'pkg-config' + cmake-args: '-DBUILDSYSTEM_TESTING=True' codecov-token: ${{ secrets.CODECOV_TOKEN }} diff --git a/CMakeLists.txt b/CMakeLists.txt index 9039bb84..f65afd9a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,6 +22,10 @@ include(IgnCMake) # Set up the project ign_configure_project() +#-------------------------------------- +# Set project-specific options +option(BUILDSYSTEM_TESTING "Enable extended buildsystem testing" FALSE) + #-------------------------------------- # Install the ignition documentation files # Note: This is not actually creating a doc target for ign-cmake; this is just @@ -148,7 +152,9 @@ message(STATUS "Install prefix: ${CMAKE_INSTALL_PREFIX}") include(CTest) if (BUILD_TESTING) add_subdirectory(test) +endif() +if (BUILD_TESTING AND BUILDSYSTEM_TESTING) #============================================================================ # Build examples #============================================================================ diff --git a/Changelog.md b/Changelog.md index 23525a83..160953a7 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,10 @@ ## Ignition CMake 2.x +### Ignition CMake 2.2.x + +1. Disable long-running buildsystem tests by default. + * [Pull request 97](https://github.com/ignitionrobotics/ign-cmake/pull/97) + ### Ignition CMake 2.2.0 1. Fix use of FindZIP without pkg-config. diff --git a/README.md b/README.md index 7867bdeb..ed1c6c97 100644 --- a/README.md +++ b/README.md @@ -102,9 +102,11 @@ Documentation for `ignition-cmake` can be found within the source code, and also # Testing +A fuller suite of tests in the `examples` directory can be enabled by building with `BUILDSYSTEM_TESTING` enabled. Tests can be run by building the `test` target. From your build directory you can run: ``` +$ cmake .. -DBUILDSYSTEM_TESTING=1 $ make test ```