Unit tests cannot parse CMake options set to BASH commands
When installing FFEA, where one has to call cmake /path/to/ffea/source [OPTIONS]
, if BASH commands are used to find certain file paths, the unit tests will take them to mean literal paths rather than commands.
For example, if we find the Python executable by using the BASH command which python, instead of the direct path to the Python, as per this example...
cmake ../ffea -DCMAKE_INSTALL_PREFIX=$HOME/softw/ffea -DPYTHON_EXECUTABLE="which python"
...the unit tests that require Python search for a directory called "which python".
For reference, which
is a BASH command that returns the location of a program's executable.
As an example, this is the output of the sphere_mass_check unit test when the above CMake command is used:
Start 5: sphere_mass_check
Could not find executable /home/ffea_user/software/ffea/FFEA_build/which python
Looked in the following places:
/home/ffea_user/software/ffea/FFEA_build/which python
/home/ffea_user/software/ffea/FFEA_build/which python
/home/ffea_user/software/ffea/FFEA_build/Release/which python
/home/ffea_user/software/ffea/FFEA_build/Release/which python
/home/ffea_user/software/ffea/FFEA_build/Debug/which python
/home/ffea_user/software/ffea/FFEA_build/Debug/which python
/home/ffea_user/software/ffea/FFEA_build/MinSizeRel/which python
/home/ffea_user/software/ffea/FFEA_build/MinSizeRel/which python
/home/ffea_user/software/ffea/FFEA_build/RelWithDebInfo/which python
/home/ffea_user/software/ffea/FFEA_build/RelWithDebInfo/which python
/home/ffea_user/software/ffea/FFEA_build/Deployment/which python
/home/ffea_user/software/ffea/FFEA_build/Deployment/which python
/home/ffea_user/software/ffea/FFEA_build/Development/which python
/home/ffea_user/software/ffea/FFEA_build/Development/which python
home/ffea_user/software/ffea/FFEA_build/which python
home/ffea_user/software/ffea/FFEA_build/which python
home/ffea_user/software/ffea/FFEA_build/Release/which python
home/ffea_user/software/ffea/FFEA_build/Release/which python
home/ffea_user/software/ffea/FFEA_build/Debug/which python
home/ffea_user/software/ffea/FFEA_build/Debug/which python
home/ffea_user/software/ffea/FFEA_build/MinSizeRel/which python
home/ffea_user/software/ffea/FFEA_build/MinSizeRel/which python
home/ffea_user/software/ffea/FFEA_build/RelWithDebInfo/which python
home/ffea_user/software/ffea/FFEA_build/RelWithDebInfo/which python
home/ffea_user/software/ffea/FFEA_build/Deployment/which python
home/ffea_user/software/ffea/FFEA_build/Deployment/which python
home/ffea_user/software/ffea/FFEA_build/Development/which python
home/ffea_user/software/ffea/FFEA_build/Development/which python
Unable to find executable: /home/ffea_user/software/ffea/FFEA_build/which python
5/51 Test #5: sphere_mass_check ........................***Not Run 0.00 sec
A full log file of all unit tests ran with make test
after this CMake command is used is attached.