Closed t-b closed 2 years ago
I'm getting
byte-physicss-Mac-Pro:build ci$ "/Users/ci/devel/tango-9.4.0/cppTango/build/cpp_test_suite/new_tests/conf_devtest" DevTest/test test/debian8/10 test/debian8/11 test/debian8/12 debian8_alias debian8_attr_alias test/fwd_debian8/10 test2/debian8/20
libc++abi.dylib: terminating with uncaught exception of type Tango::ConnectionFailed
when I run the tests with the above patch.
One comment here:
docker run \
--name "$tango_container" \
+ - p 10000:10000 \
--rm \
This is going to break during parallel execution. If we really must expose ports, I just suggest to pick a random one for each test and use that on the host side (just change TANGO_HOST few lines below). To make it more robust we may check if this random port is really available before using it (but this would probably require netcat or something similar).
@t-b you can't use the container IP address for TANGO_HOST="${tango_ipaddr}:10000"
.
As the port is exposed you should use localhost
or the IP of the host machine.
Using a random port:
docker run \
--name "$tango_container" \
+ - p 10000 \
--rm \
+tango_port="$(docker inspect --format='{{(index (index .NetworkSettings.Ports "10000/tcp") 0).HostPort}}' "$tango_container")"
-export TANGO_HOST="${tango_ipaddr}:10000"
+export TANGO_HOST="localhost:$tango_port"
@beenje I'll give that a shot once I continue this journey here.
This is the result I got with those changes:
90% tests passed, 9 tests failed out of 93
Total Test time (real) = 6340.98 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)
31 - CXX::cxx_fwd_att (Failed)
58 - old_tests::ds_cache (Failed)
60 - old_tests::lock (Failed)
@beenje Thanks for trying it out. We'd welcome a PR using GH actions for CI testing cppTango on macOS. We just need not to break the existing tests on linux.
For the tests it is okay to initially fail, we can do that peu a peu later on.
I'll try to make a PR when I find some time. Will probably wait for #812 decision.
I have one question about having to set DYLD_LIBRARY_PATH
. I understand it's due to: https://github.com/tango-controls/cppTango/blob/fe934f0ccf09980e679e1f87b0bd042573a31a9b/cppapi/server/class_factory.cpp#L156
Do we really need to call dlopen
on the exe
and not the lib? I can't find that on Linux.
If it's required, can't we get the full path of the exe directly in the code?
make test
See https://www.tango-controls.org/community/forum/c/general/installation/recipe-to-install-tango-9-from-source-on-macos-x-high-sierra/?page=4