Revert of Improve Android scripts: (https://codereview.chromium.org/254923003/)

Reason for revert:
errors

Original issue's description:
> Improve Android scripts:
>
> * android_gdbserver:
>   - Don't complain if $GDB_TMP_DIR already exists
>   - Since $GDB_TMP_DIR/gdb.setup might already exist, overwrite the file.
>
> * android_run_skia:
>   - Move resource files onto the device.
>   - Change to tmp directory before executing program.
>
> * android_make, android_setup:
>   - stop assuming PWD is skia source directory.
>
> NOTRY=true
>
> Committed: http://code.google.com/p/skia/source/detail?r=14442

R=djsollen@google.com, scroggo@google.com
TBR=djsollen@google.com, scroggo@google.com
NOTREECHECKS=true
NOTRY=true

Author: halcanary@google.com

Review URL: https://codereview.chromium.org/254073003

git-svn-id: http://skia.googlecode.com/svn/trunk@14448 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
commit-bot@chromium.org 2014-04-29 21:00:06 +00:00
parent 2e21823e64
commit edea842b6a
5 changed files with 13 additions and 27 deletions

View File

@ -25,19 +25,15 @@ PORT=5039
# Set up gdb commands
GDBSETUP=$GDB_TMP_DIR/gdb.setup
{
echo "file ${GDB_TMP_DIR}/skia_launcher"
echo "target remote :${PORT}"
echo "set solib-absolute-prefix ${GDB_TMP_DIR}"
echo "set solib-search-path ${GDB_TMP_DIR}
# The apps shared library symbols are not loaded by default so we
# load them here."
echo "break launch_app"
echo "continue"
echo "sharedLibrary ${APP_NAME}"
} > $GDBSETUP
echo "file $GDB_TMP_DIR/skia_launcher" >> $GDBSETUP
echo "target remote :$PORT" >> $GDBSETUP
echo "set solib-absolute-prefix $GDB_TMP_DIR" >> $GDBSETUP
echo "set solib-search-path $GDB_TMP_DIR" >> $GDBSETUP
# The apps shared library symbols are not loaded by default so we load them here
echo "break launch_app" >> $GDBSETUP
echo "continue" >> $GDBSETUP
echo "sharedLibrary $APP_NAME" >> $GDBSETUP
# Launch gdb client
echo "Entering gdb client shell"

View File

@ -19,7 +19,7 @@ fi
# We need the debug symbols from these files
GDB_TMP_DIR=$(pwd)/android_gdb_tmp
mkdir -p $GDB_TMP_DIR
mkdir $GDB_TMP_DIR
echo "Copying symbol files"
SYSTEM_LIBRARY_PATH=/system/lib

View File

@ -11,8 +11,7 @@ rm -f .android_config
SCRIPT_DIR=$(dirname "${BASH_SOURCE[0]}")
source $SCRIPT_DIR/android_setup.sh
SKIA_SRC_DIR=$(cd "${SCRIPT_DIR}/../../.."; pwd)
GYP_GENERATORS=ninja-android "${SKIA_SRC_DIR}/gyp_skia"
GYP_GENERATORS=ninja-android ./gyp_skia
ninja -C $SKIA_OUT/$BUILDTYPE ${APP_ARGS[@]}
# Write the device id into the .android_config file. This tells

View File

@ -13,13 +13,6 @@ then
exit 1
fi
(
SKIA_SRC_DIR=$(cd ${SCRIPT_DIR}/../../..; pwd)
cd "$SKIA_SRC_DIR"
for resource in $(find resources -type f); do
adb_push_if_needed "$resource" "/data/local/tmp/${resource}"
done
)
adb_push_if_needed "${SKIA_OUT}/$BUILDTYPE/skia_launcher" /data/local/tmp
if [ -f "${SKIA_OUT}/$BUILDTYPE/lib/libskia_android.so" ]; then
# Does not exist for builds with static skia.
@ -29,7 +22,7 @@ adb_push_if_needed "${SKIA_OUT}/$BUILDTYPE/lib/lib${APP_ARGS[0]}.so" /data/local
STATUS_FILENAME="/data/local/tmp/.skia_tmp_$(date +%s%N)"
$ADB ${DEVICE_SERIAL} shell \
"cd /data/local/tmp; ./skia_launcher ${APP_ARGS[@]}; echo \$? > ${STATUS_FILENAME}"
"/data/local/tmp/skia_launcher ${APP_ARGS[@]}; echo \$? > ${STATUS_FILENAME}"
if [ -z "$($ADB $DEVICE_SERIAL shell 'if [ -f $STATUS_FILENAME ]; then echo exists; fi')" ]; then
exit 1
fi

View File

@ -146,11 +146,9 @@ setup_device() {
source $SCRIPT_DIR/utils/setup_toolchain.sh
DEFINES="${DEFINES} android_toolchain=${TOOLCHAIN_TYPE}"
exportVar GYP_DEFINES "$DEFINES $GYP_DEFINES"
SKIA_SRC_DIR=$(cd "${SCRIPT_DIR}/../../.."; pwd)
DEFAULT_SKIA_OUT="${SKIA_SRC_DIR}/out/config/android-${TARGET_DEVICE}"
exportVar SKIA_OUT "${SKIA_OUT:-${DEFAULT_SKIA_OUT}}"
exportVar GYP_DEFINES "$DEFINES $GYP_DEFINES"
exportVar SKIA_OUT "${SKIA_OUT:-out/config/android-${TARGET_DEVICE}}"
}
# adb_pull_if_needed(android_src, host_dst)