From: SeokYeon Hwang Date: Mon, 21 Dec 2015 06:45:28 +0000 (+0900) Subject: verify: add symbolic link preserving test X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=01f6e13d7d39a727e3080bdf14475a077bcb69a1;p=sdk%2Femulator%2Femulator-lib.git verify: add symbolic link preserving test "emulator-library-pool" should be zipped with storing symbolic links. Change-Id: I3ff4dc4c7906d65964b4ce46211bce7b10be71dc Signed-off-by: SeokYeon Hwang --- diff --git a/package/build.common b/package/build.common index 8c93959..fb738bf 100644 --- a/package/build.common +++ b/package/build.common @@ -58,6 +58,15 @@ find_file_to_set_permission() done } +test_symlink() +{ + if [ ! -h "$ROOTDIR/tests/testsymlink" ] + then + echo "'emulator-library-pool' should be zipped with storing symbolic links" + exit 1 + fi +} + verify_swt() { TMP_SWT_DIR="$SRCDIR/swt" @@ -156,6 +165,7 @@ prepare_common() verify_common() { + test_symlink verify_swt "$LIB_PACKAGE_DIR/$SWT_FILE" verify_swt "$DEV_PACKAGE_DIR/$SWT_FILE" } diff --git a/package/build.linux b/package/build.linux index a1cafd7..b357e60 100644 --- a/package/build.linux +++ b/package/build.linux @@ -11,7 +11,7 @@ check_archi_windows_32() { . $SRCDIR/package/build.common if [ "$(contains_string "$1" ".dll")" = "$RESULT_CONTAINS" ];then - FILE_RESULT="$(/usr/bin/file "$1")" + FILE_RESULT="$(/usr/bin/file $(readlink -f "$1"))" ARCH_OK=0 if [ "$(contains_string "$FILE_RESULT" "32-bit")" = "$RESULT_CONTAINS" ];then echo "$1 has the supported architecture" @@ -31,7 +31,7 @@ check_archi_windows_64() { . $SRCDIR/package/build.common if [ "$(contains_string "$1" ".dll")" = "$RESULT_CONTAINS" ];then - FILE_RESULT="$(/usr/bin/file "$1")" + FILE_RESULT="$(/usr/bin/file $(readlink -f "$1"))" ARCH_OK=0 if [ "$(contains_string "$FILE_RESULT" "32-bit")" = "$RESULT_CONTAINS" ];then echo "$1 has the supported architecture" @@ -54,7 +54,7 @@ check_archi_ubuntu_32() { . $SRCDIR/package/build.common if [ "$(contains_string "$1" ".so")" = "$RESULT_CONTAINS" ];then - FILE_RESULT="$(/usr/bin/file "$1")" + FILE_RESULT="$(/usr/bin/file $(readlink -f "$1"))" if [ "$(contains_string "$FILE_RESULT" "32-bit")" = "$RESULT_NOT_CONTAINS" ];then echo "$1 has not the supported architecture" exit 1 @@ -67,7 +67,7 @@ check_archi_ubuntu_64() { . $SRCDIR/package/build.common if [ "$(contains_string "$1" ".so")" = "$RESULT_CONTAINS" ];then - FILE_RESULT="$(/usr/bin/file "$1")" + FILE_RESULT="$(/usr/bin/file $(readlink -f "$1"))" if [ "$(contains_string "$FILE_RESULT" "64-bit")" = "$RESULT_NOT_CONTAINS" ];then echo "$1 has not the supported architecture" exit 1 diff --git a/package/build.macos b/package/build.macos index 7655ddc..b4101da 100644 --- a/package/build.macos +++ b/package/build.macos @@ -109,8 +109,13 @@ patch_for_other_dir() check_archi_macos_64() { . $SRCDIR/package/build.common + + if [ -h "$1" ]; then + return + fi + FILE_RESULT="$(/usr/bin/file "$1")" - if [ "$(contains_string "$FILE_RESULT" "dynamically linked shared library")" == "$RESULT_CONTAINS" ];then + if [ "$(contains_string "$FILE_RESULT" "dynamically linked shared library")" == "$RESULT_CONTAINS" ]; then if [ "$(contains_string "$FILE_RESULT" $BUILD_ARCH)" == "$RESULT_NOT_CONTAINS" ];then echo "$1 has not the supported architecture" exit 1