aboutsummaryrefslogtreecommitdiff
path: root/test/test-tcp-bind6-error.c
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2014-12-28 18:14:34 +0100
committerBen Noordhuis <info@bnoordhuis.nl>2014-12-28 22:51:05 +0100
commit9141f48ea551c1538bbab17c44c8f9e8393b5679 (patch)
treebbe9bf9c857a65a639a91e8088e8e54d26c8d64c /test/test-tcp-bind6-error.c
parentc71e7b753c243c8e23b2f7ed3f9eef131224c7c0 (diff)
downloadlibuv-9141f48ea551c1538bbab17c44c8f9e8393b5679.tar.gz
libuv-9141f48ea551c1538bbab17c44c8f9e8393b5679.zip
test: fix spawn test with autotools build
Fix spawn_reads_child_path when executed as `test/run-tests` or `make check`: 1. `make check` builds a dynamic libuv.so or libuv.dyld by default. 2. spawn_reads_child_path spawns a new instance of the test runner by consulting uv_exepath() and executing the result. 3. `test/run-tests` is normally a shell script that sets up DYLD_LIBRARY_PATH or LD_LIBRARY_PATH before executing the real test runner in `test/.libs`. 4. uv_exepath() (corectly) returns the path of the binary in `test/.libs`. The binary is linked against libuv.so but that library is not on any of the default linker paths; and if it is, it's almost certainly the wrong version. 5. Ergo, carry over the value of the (DY)LD_LIBRARY_PATH environment variable into the environment of the child process so that the dynamic linker knows where to find the library. Alternatively, we could link the test runner statically against libuv.a but that breaks `make check` when configured with `--disable-static`. Fixes: https://github.com/libuv/libuv/issues/85 PR-URL: https://github.com/libuv/libuv/pull/91 Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Diffstat (limited to 'test/test-tcp-bind6-error.c')
0 files changed, 0 insertions, 0 deletions