diff options
author | Kevin Rocard <kevin.rocard@intel.com> | 2015-03-12 19:00:07 +0100 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2015-04-24 13:32:47 -0700 |
commit | 053e3cdfdc479e76c8516efd585f9909b249713a (patch) | |
tree | c2d380c105080dda112fef51e1654dbd8ebbfbd1 | |
parent | 747bb84d27518ba1ab0c49d619a812b43222fdcf (diff) | |
download | external_parameter-framework-053e3cdfdc479e76c8516efd585f9909b249713a.zip external_parameter-framework-053e3cdfdc479e76c8516efd585f9909b249713a.tar.gz external_parameter-framework-053e3cdfdc479e76c8516efd585f9909b249713a.tar.bz2 |
Fail build if test are enabled but can not be built
The fix point parameter test used to display a warning if
it could not be run.
Transform it to an errors if the tests are explicitly activated
through the BUILD_TESTING option. BUILD_TESTING is declared by ctest.
Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
-rw-r--r-- | test/test-fixed-point-parameter/CMakeLists.txt | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/test/test-fixed-point-parameter/CMakeLists.txt b/test/test-fixed-point-parameter/CMakeLists.txt index 44410b0..b9c8af3 100644 --- a/test/test-fixed-point-parameter/CMakeLists.txt +++ b/test/test-fixed-point-parameter/CMakeLists.txt @@ -26,12 +26,10 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -find_program(python2 python2) +if (BUILD_TESTING) + find_program(python2 python2) -if(python2) add_test(NAME fix_point_parameter WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND ${python2} Main.py) -else(python2) - message(WARNING "Disabling fix point parameter test as python2 is not installed.") -endif(python2) +endif() |