Add library path to run layout_test
authorKangYong Park <kaka.park@samsung.com>
Thu, 22 Jan 2015 10:23:13 +0000 (19:23 +0900)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
For layout_test, content_shell is used.
And it needs to import some libraries for running content_shell.
This patch adds the path of necessary libraries automatically.
Reviewed by: Antonio Gomes, SeungSeop Park

Change-Id: I0ae20390a3964cce09e6099ceb3319420ea82411
Signed-off-by: KangYong Park <kaka.park@samsung.com>
tizen_src/scripts/run-layout-tests

index ff2783d1725ca00306a9436bbb3f58164b7b3c70..6e9b06e26beec18098a8267617a05aea2e711247 100755 (executable)
@@ -14,6 +14,23 @@ if [ ! -x $_top_dir/$_out/$_mode/content_shell_efl ]; then
     exit 1
 fi
 
+function getHostArch() {
+  echo $(uname -m | sed -e \
+        's/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/')
+}
+
+_LIBDIR=lib
+if [ "$(getHostArch)" == "x64" ]; then
+      _LIBDIR=lib64
+fi
+
+BUILDDIR=$_top_dir/out.$(getHostArch)/$_mode
+CHROMIUM_EFL_LIBDIR=$BUILDDIR/lib
+CHROMIUM_EFL_DEPENDENCIES_LIBDIR=$BUILDDIR/../Dependencies/Root/$_LIBDIR
+
+export LD_LIBRARY_PATH=$CHROMIUM_EFL_DEPENDENCIES_LIBDIR:$CHROMIUM_EFL_LIBDIR:${LD_LIBRARY_PATH}
+echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}"
+
 # The test runner expects driver binary to be called content_shell.
 ln -f $_top_dir/$_out/$_mode/content_shell_efl \
       $_top_dir/$_out/$_mode/content_shell