• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2
3set -ex
4
5# Instrumentation tests log results to logcat, so enable it during test runs.
6adb logcat *:S TestRunner:V & LOGCAT_PID=$!
7
8readonly GRADLE_PROJECTS=(
9    "javatests/artifacts/hilt-android/simple"
10    "javatests/artifacts/hilt-android/simpleKotlin"
11    "javatests/artifacts/hilt-android/viewmodel"
12    "javatests/artifacts/hilt-android/lazyclasskey"
13    "javatests/artifacts/dagger/lazyclasskey"
14)
15for project in "${GRADLE_PROJECTS[@]}"; do
16    echo "Running gradle Android emulator tests for $project"
17    ./$project/gradlew -p $project connectedAndroidTest --continue --no-daemon --stacktrace --configuration-cache
18done
19
20# Close logcat
21if [ -n "$LOGCAT_PID" ] ; then kill $LOGCAT_PID; fi
22