mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 09:08:52 -06:00
Update run_tests script to run JVM tests
This commit is contained in:
@@ -14,11 +14,14 @@ fail() {
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
info "Running JVM tests..."
|
||||||
|
./gradlew :app:testDebugUnitTest >> $LOG 2>> $LOG || fail
|
||||||
|
|
||||||
info "Cleaning output directory..."
|
info "Cleaning output directory..."
|
||||||
rm -rf ${OUTPUT_DIR}
|
rm -rf ${OUTPUT_DIR}
|
||||||
mkdir -p ${OUTPUT_DIR}
|
mkdir -p ${OUTPUT_DIR}
|
||||||
|
|
||||||
info "Building project..."
|
info "Building instrumentation APKs..."
|
||||||
./gradlew assembleDebug assembleAndroidTest >> $LOG 2>> $LOG || fail
|
./gradlew assembleDebug assembleAndroidTest >> $LOG 2>> $LOG || fail
|
||||||
|
|
||||||
info "Installing APK..."
|
info "Installing APK..."
|
||||||
@@ -30,9 +33,9 @@ info "Granting permissions..."
|
|||||||
adb shell pm grant org.isoron.uhabits android.permission.SET_ANIMATION_SCALE \
|
adb shell pm grant org.isoron.uhabits android.permission.SET_ANIMATION_SCALE \
|
||||||
>> $LOG 2>> $LOG || fail
|
>> $LOG 2>> $LOG || fail
|
||||||
|
|
||||||
info "Running tests..."
|
info "Running instrumentation tests..."
|
||||||
adb shell am instrument \
|
adb shell am instrument \
|
||||||
-e coverage true $* \
|
-e coverage true -e size medium \
|
||||||
-w ${PACKAGE_NAME}.test/android.support.test.runner.AndroidJUnitRunner \
|
-w ${PACKAGE_NAME}.test/android.support.test.runner.AndroidJUnitRunner \
|
||||||
| tee ${OUTPUT_DIR}/runner.txt \
|
| tee ${OUTPUT_DIR}/runner.txt \
|
||||||
| tee -a $LOG
|
| tee -a $LOG
|
||||||
|
|||||||
Reference in New Issue
Block a user