Recipe to install Tango 9 from source on MacOS X high Sierra

Ok, the cpp_test_suite is now running under macOS.
Here are the modifications I had to apply to make it work:

1 - cpp_test_suite/environment/setup_database.sh.cmake has beeb modified to specify the appropriate port forwarding option for the database (-p option):
docker run \
–name "$tango_container" \
-p 10000:10000 \
–rm \
-e TANGO_HOST=127.0.0.1:10000 \
-e MYSQL_HOST=mysql_db:3306 \
-e MYSQL_USER=tango \
-e MYSQL_PASSWORD=tango \
-e MYSQL_DATABASE=tango \
–link "$mysql_container":mysql_db \
-d tangocs/tango-cs:latest \
> /dev/null


2 - cpp_test_suite/environment/start_server.sh.cmake must be modified in order to insert the server_path into the DYLD_LYBRARY_PATH env. var:
echo "Starting $server/$instance"

export DYLD_LIBRARY_PATH="@PROJECT_BINARY_DIR@/${server_path}":$DYLD_LIBRARY_PATH

"@PROJECT_BINARY_DIR@/${server_path}/${server}" "$instance" -v5 \
&> "${TANGO_TEST_CASE_DIRECTORY}/${server}_${instance}.${index}.out" &


BTW, whatever is the Tango device server you want to start on macOS, its path (i.e. its location) must be in the DYLD_LIBRARY_PATH - otherwise the runtime can't resolve the dserver class_factory method (see. "_ZN5Tango7DServer13class_factoryEv" in cppapi/server/class_factory.cpp).

3 - The port forwarding option has an impact on the test suite timing. We now must be sure that the "previous" database container (i.e. the one instanciated for the previous test) has exited and released the port (port 10000 here) before launching the 'next' test - otherwise we get the following error: docker: Error response from daemon: driver failed programming external connectivity on endpoint tango_container (…): Bind for 0.0.0.0:10000 failed: port is already allocated.. I consequently had to remove the background execution option (i.e. "&") in teardown function located in cpp_test_suite/environment/run_with_fixture.sh.cmake.
Edited 2 months ago
Here are the cpp_test_suite results I obtain.
I let you guys comment on the severity of the failures - in terms of "missing features on macOS" it could represent to live with them.

92% tests passed, 7 tests failed out of 93

Total Test time (real) = 2691.39 sec

The following tests FAILED:
6 - CXX::cxx_dserver_misc (Failed)
8 - CXX::cxx_blackbox (Failed)
9 - CXX::cxx_class_dev_signal (Failed)
10 - CXX::cxx_class_signal (Failed)
21 - CXX::cxx_signal (Failed)
23 - CXX::cxx_misc (Failed)
58 - old_tests::ds_cache (Failed)
Edited 2 months ago
 
Register or login to create to post a reply.