docs: avoid overwrite of LD_LIBRARY_PATH during basic testing
authorAndres Gomez <agomez@igalia.com>
Sat, 8 Jul 2017 19:59:40 +0000 (22:59 +0300)
committerAndres Gomez <agomez@igalia.com>
Wed, 19 Jul 2017 16:10:10 +0000 (19:10 +0300)
The LD_LIBRARY_PATH environment variable could be already defined so
we extend it and restore it rather than just overwriting it.

v2:
 - Unset the __old_ld helper variable when we are done with it.
 - Corrected test for and escaping of variables (Eric).

v3: Remove unneeded variable (Emil).

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
docs/releasing.html

index 85ab6ae8cb1b4b5f47f448877d8927f39cb9e9e4..1ef3fd89a13f43d99d8ee1942e98b02ba9bfd13b 100644 (file)
@@ -472,7 +472,8 @@ Here is one solution that I've been using.
        __glxgears_cmd='glxgears 2>&amp;1 | grep -v "configuration file"'
        __es2info_cmd='es2_info 2>&amp;1 | egrep "GL_VERSION|GL_RENDERER|.*dri\.so"'
        __es2gears_cmd='es2gears_x11 2>&amp;1 | grep -v "configuration file"'
-       export LD_LIBRARY_PATH=`pwd`/test/usr/local/lib/
+       test "x$LD_LIBRARY_PATH" != 'x' &amp;&amp; __old_ld="$LD_LIBRARY_PATH"
+       export LD_LIBRARY_PATH=`pwd`/test/usr/local/lib/:"${__old_ld}"
        export LIBGL_DRIVERS_PATH=`pwd`/test/usr/local/lib/dri/
        export LIBGL_DEBUG=verbose
        eval $__glxinfo_cmd
@@ -492,6 +493,7 @@ Here is one solution that I've been using.
        eval $__es2gears_cmd
        # Smoke test DOTA2
        unset LD_LIBRARY_PATH
+       test "x$__old_ld" != 'x' &amp;&amp; export LD_LIBRARY_PATH="$__old_ld" &amp;&amp; unset __old_ld
        unset LIBGL_DRIVERS_PATH
        unset LIBGL_DEBUG
        unset LIBGL_ALWAYS_SOFTWARE