Robert Quattlebaum 03ffec0969 android.net.lowpan: Added basic unit tests.
This change has all of the bits for supporting LoWPAN unit tests.
Additional tests are being written to improve code coverage, but this
seems like a good start.

Bug: b/33073713
Test: Successfully ran enclosed unit tests
Change-Id: Ib3750be5052bf1a90bf871756e9121b047d3871f
2017-07-10 11:08:29 -07:00

25 lines
703 B
Bash
Executable File

#!/usr/bin/env bash
if [ -z $ANDROID_BUILD_TOP ]; then
echo "You need to source and lunch before you can use this script"
exit 1
fi
echo "Running tests"
set -e # fail early
echo "+ mmma -j32 $ANDROID_BUILD_TOP/frameworks/base/lowpan/tests"
# NOTE Don't actually run the command above since this shell doesn't inherit functions from the
# caller.
make -j32 -C $ANDROID_BUILD_TOP -f build/core/main.mk MODULES-IN-frameworks-base-lowpan-tests
set -x # print commands
adb root
adb wait-for-device
adb install -r -g "$OUT/data/app/FrameworksLowpanApiTests/FrameworksLowpanApiTests.apk"
adb shell am instrument -w "$@" 'android.net.lowpan.test/android.support.test.runner.AndroidJUnitRunner'