103ffec0969af9e9d42a73f5da2660a45cd9f6a64Robert Quattlebaum#!/usr/bin/env bash 203ffec0969af9e9d42a73f5da2660a45cd9f6a64Robert Quattlebaum 303ffec0969af9e9d42a73f5da2660a45cd9f6a64Robert Quattlebaumif [ -z $ANDROID_BUILD_TOP ]; then 403ffec0969af9e9d42a73f5da2660a45cd9f6a64Robert Quattlebaum echo "You need to source and lunch before you can use this script" 503ffec0969af9e9d42a73f5da2660a45cd9f6a64Robert Quattlebaum exit 1 603ffec0969af9e9d42a73f5da2660a45cd9f6a64Robert Quattlebaumfi 703ffec0969af9e9d42a73f5da2660a45cd9f6a64Robert Quattlebaum 803ffec0969af9e9d42a73f5da2660a45cd9f6a64Robert Quattlebaumecho "Running tests" 903ffec0969af9e9d42a73f5da2660a45cd9f6a64Robert Quattlebaum 1003ffec0969af9e9d42a73f5da2660a45cd9f6a64Robert Quattlebaumset -e # fail early 1103ffec0969af9e9d42a73f5da2660a45cd9f6a64Robert Quattlebaum 1203ffec0969af9e9d42a73f5da2660a45cd9f6a64Robert Quattlebaumecho "+ mmma -j32 $ANDROID_BUILD_TOP/frameworks/base/lowpan/tests" 1303ffec0969af9e9d42a73f5da2660a45cd9f6a64Robert Quattlebaum# NOTE Don't actually run the command above since this shell doesn't inherit functions from the 1403ffec0969af9e9d42a73f5da2660a45cd9f6a64Robert Quattlebaum# caller. 1503ffec0969af9e9d42a73f5da2660a45cd9f6a64Robert Quattlebaummake -j32 -C $ANDROID_BUILD_TOP -f build/core/main.mk MODULES-IN-frameworks-base-lowpan-tests 1603ffec0969af9e9d42a73f5da2660a45cd9f6a64Robert Quattlebaum 1703ffec0969af9e9d42a73f5da2660a45cd9f6a64Robert Quattlebaumset -x # print commands 1803ffec0969af9e9d42a73f5da2660a45cd9f6a64Robert Quattlebaum 1903ffec0969af9e9d42a73f5da2660a45cd9f6a64Robert Quattlebaumadb root 2003ffec0969af9e9d42a73f5da2660a45cd9f6a64Robert Quattlebaumadb wait-for-device 2103ffec0969af9e9d42a73f5da2660a45cd9f6a64Robert Quattlebaum 2203ffec0969af9e9d42a73f5da2660a45cd9f6a64Robert Quattlebaumadb install -r -g "$OUT/data/app/FrameworksLowpanApiTests/FrameworksLowpanApiTests.apk" 2303ffec0969af9e9d42a73f5da2660a45cd9f6a64Robert Quattlebaum 2403ffec0969af9e9d42a73f5da2660a45cd9f6a64Robert Quattlebaumadb shell am instrument -w "$@" 'android.net.lowpan.test/android.support.test.runner.AndroidJUnitRunner' 25