MantisBT - CMake
View Issue Details
0015566CMakeCMakepublic2015-05-13 16:432015-11-02 09:15
Faheem Mitha 
 
normalminoralways
closedfixed 
amd64 LinuxDebian GNU/Linux8.0 (jessie)
CMake 3.2.2 
CMake 3.3CMake 3.3 
0015566: Some tests fail when source and build tree are under /usr/local
The following tests fail on jessie with current master.

26 - FindPackageTest (Failed)
232 - CTestTestStopTime (Failed)
283 - RunCMake.CMP0041 (Failed)
375 - RunCMake.IfacePaths_INCLUDE_DIRECTORIES (Failed)
409 - CMake.CheckSourceTree (Failed)

This is in a chroot. I attach verbose output of tests, and
also the result of running dpkg --get-selections in the chroot
1) Create chroot using list of packages above
2) In top level source dir:
   mkdir build
   cd build
   cmake ..
   make -j <number-of-jobs>
   bin/ctest -j <number-of-jobs>

To produce only verbose output for the tests, I did

    bin/ctest -j <number-of-jobs> -V -R testname
No tags attached.
? dpkg-get-selections (36,224) 2015-05-13 16:43
https://public.kitware.com/Bug/file/5456/dpkg-get-selections
? FindPackageTest.out (3,243) 2015-05-13 16:44
https://public.kitware.com/Bug/file/5457/FindPackageTest.out
? CTestTestStopTime (2,910) 2015-05-13 16:45
https://public.kitware.com/Bug/file/5458/CTestTestStopTime
? RunCMake.CMP0041 (6,637) 2015-05-13 16:46
https://public.kitware.com/Bug/file/5459/RunCMake.CMP0041
? RunCMake.IfacePaths_INCLUDE_DIRECTORIES (4,881) 2015-05-13 16:46
https://public.kitware.com/Bug/file/5460/RunCMake.IfacePaths_INCLUDE_DIRECTORIES
? CMake.CheckSourceTree (4,445) 2015-05-13 16:47
https://public.kitware.com/Bug/file/5461/CMake.CheckSourceTree
Issue History
2015-05-13 16:43Faheem MithaNew Issue
2015-05-13 16:43Faheem MithaFile Added: dpkg-get-selections
2015-05-13 16:44Faheem MithaFile Added: FindPackageTest.out
2015-05-13 16:45Faheem MithaFile Added: CTestTestStopTime
2015-05-13 16:46Faheem MithaFile Added: RunCMake.CMP0041
2015-05-13 16:46Faheem MithaFile Added: RunCMake.IfacePaths_INCLUDE_DIRECTORIES
2015-05-13 16:47Faheem MithaFile Added: CMake.CheckSourceTree
2015-05-14 10:01Brad KingSummary5 tests fail on amd64 Debian jessie => Some tests fail when source and build tree are under /usr/local
2015-05-14 10:22Brad KingNote Added: 0038746
2015-05-14 10:22Brad KingStatusnew => resolved
2015-05-14 10:22Brad KingResolutionopen => fixed
2015-05-14 10:22Brad KingFixed in Version => CMake 3.3
2015-05-14 10:22Brad KingTarget Version => CMake 3.3
2015-05-14 14:03Faheem MithaNote Added: 0038748
2015-11-02 09:15Robert MaynardNote Added: 0039811
2015-11-02 09:15Robert MaynardStatusresolved => closed

Notes
(0038746)
Brad King   
2015-05-14 10:22   
The CheckSourceTree failure is because the build tree is under the source tree:

 Tests: Fix CheckSourceTree test when build is under source
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=332ee3e3 [^]

Other failures are in tests that check some combinations of source/build/install directory interaction. They fail because CMake is built in a directory under the default install prefix (/usr/local) and so think their source/build tree are under the install prefix within the test. Instead the tests must ensure this is not the case by setting CMAKE_INSTALL_PREFIX themselves:

 Tests: Fix failures when running under the default install prefix
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d430cb7c [^]
(0038748)
Faheem Mitha   
2015-05-14 14:03   
Thank you for fixing the bug. Faheem
(0039811)
Robert Maynard   
2015-11-02 09:15   
Closing resolved issues that have not been updated in more than 4 months.