mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 01:08:50 -06:00
Update test screenshots; automatically fetch
This commit is contained in:
21
build.sh
21
build.sh
@@ -133,6 +133,9 @@ android_test() {
|
|||||||
log_error "Some $size instrumented tests failed."
|
log_error "Some $size instrumented tests failed."
|
||||||
log_error "Saving logcat: $OUT_LOGCAT..."
|
log_error "Saving logcat: $OUT_LOGCAT..."
|
||||||
$ADB logcat -d > $OUT_LOGCAT
|
$ADB logcat -d > $OUT_LOGCAT
|
||||||
|
log_error "Fetching test screenshots..."
|
||||||
|
$ADB pull /sdcard/Android/data/${PACKAGE_NAME}/files/test-screenshots ${ANDROID_OUTPUTS_DIR}/
|
||||||
|
$ADB shell rm -r /sdcard/Android/data/${PACKAGE_NAME}/files/test-screenshots/
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
log_info "$size tests passed."
|
log_info "$size tests passed."
|
||||||
@@ -198,13 +201,6 @@ android_build() {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
android_fetch_images() {
|
|
||||||
log_info "Fetching images"
|
|
||||||
rm -rf ${ANDROID_OUTPUTS_DIR}/test-screenshots
|
|
||||||
$ADB pull /sdcard/Android/data/${PACKAGE_NAME}/files/test-screenshots ${ANDROID_OUTPUTS_DIR}/
|
|
||||||
$ADB shell rm -r /sdcard/Android/data/${PACKAGE_NAME}/files/test-screenshots/
|
|
||||||
}
|
|
||||||
|
|
||||||
android_accept_images() {
|
android_accept_images() {
|
||||||
find ${ANDROID_OUTPUTS_DIR}/test-screenshots -name '*.expected*' -delete
|
find ${ANDROID_OUTPUTS_DIR}/test-screenshots -name '*.expected*' -delete
|
||||||
rsync -av ${ANDROID_OUTPUTS_DIR}/test-screenshots/ uhabits-android/src/androidTest/assets/
|
rsync -av ${ANDROID_OUTPUTS_DIR}/test-screenshots/ uhabits-android/src/androidTest/assets/
|
||||||
@@ -233,18 +229,14 @@ CI/CD script for Loop Habit Tracker.
|
|||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
build.sh build [options]
|
build.sh build [options]
|
||||||
build.sh clean [options]
|
|
||||||
build.sh android-tests <API> [options]
|
build.sh android-tests <API> [options]
|
||||||
build.sh android-tests-parallel <API> <API>... [options]
|
build.sh android-tests-parallel <API> <API>... [options]
|
||||||
build.sh android-fetch-images [options]
|
|
||||||
build.sh android-accept-images [options]
|
build.sh android-accept-images [options]
|
||||||
|
|
||||||
Commands:
|
Commands:
|
||||||
build Build the app and run small tests
|
build Build the app and run small tests
|
||||||
clean Remove all build directories
|
|
||||||
android-tests Run medium and large Android tests on an emulator
|
android-tests Run medium and large Android tests on an emulator
|
||||||
android-tests-parallel Tests multiple API levels simultaneously
|
android-tests-parallel Tests multiple API levels simultaneously
|
||||||
android-fetch-images Fetch failed view test images from device
|
|
||||||
android-accept-images Copy fetched images to corresponding assets folder
|
android-accept-images Copy fetched images to corresponding assets folder
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
@@ -274,12 +266,10 @@ main() {
|
|||||||
case "$1" in
|
case "$1" in
|
||||||
build)
|
build)
|
||||||
shift; _parse_opts "$@"
|
shift; _parse_opts "$@"
|
||||||
|
clean
|
||||||
core_build
|
core_build
|
||||||
android_build
|
android_build
|
||||||
;;
|
;;
|
||||||
clean)
|
|
||||||
clean
|
|
||||||
;;
|
|
||||||
android-tests)
|
android-tests)
|
||||||
shift; _parse_opts "$@"
|
shift; _parse_opts "$@"
|
||||||
if [ -z $1 ]; then
|
if [ -z $1 ]; then
|
||||||
@@ -297,9 +287,6 @@ main() {
|
|||||||
shift; _parse_opts "$@"
|
shift; _parse_opts "$@"
|
||||||
android_test_parallel $*
|
android_test_parallel $*
|
||||||
;;
|
;;
|
||||||
android-fetch-images)
|
|
||||||
android_fetch_images
|
|
||||||
;;
|
|
||||||
android-accept-images)
|
android-accept-images)
|
||||||
android_accept_images
|
android_accept_images
|
||||||
;;
|
;;
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 7.0 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.7 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 21 KiB |
@@ -50,7 +50,7 @@ class CheckmarkWidgetViewTest : BaseViewTest() {
|
|||||||
name = habit.name
|
name = habit.name
|
||||||
}
|
}
|
||||||
view.refresh()
|
view.refresh()
|
||||||
measureView(view, dpToPixels(100), dpToPixels(200))
|
measureView(view, dpToPixels(100), dpToPixels(125))
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Reference in New Issue
Block a user