Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/android.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÁlvaro Brey <alvaro.brey@nextcloud.com>2022-06-08 16:40:37 +0300
committerÁlvaro Brey <alvaro.brey@nextcloud.com>2022-06-10 17:29:57 +0300
commit22deea9e4f16896477b4b45d4977c16f5272ae3c (patch)
treef4f5570f4ae83c1875ca39df42e32d5d7e59295c /scripts
parente644b12aee14087eeea4b8bf68f3d11de9eb289c (diff)
Upload logcat on failing master-IT builds
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/runCombinedTest.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/runCombinedTest.sh b/scripts/runCombinedTest.sh
index 80c8ac87da..d573ff4fca 100755
--- a/scripts/runCombinedTest.sh
+++ b/scripts/runCombinedTest.sh
@@ -5,6 +5,17 @@ LOG_USERNAME=$2
LOG_PASSWORD=$3
DRONE_BUILD_NUMBER=$4
+function upload_logcat() {
+ set -x
+ log_filename="${DRONE_PULL_REQUEST}_logcat.txt.gz"
+ log_file="app/build/${log_filename}"
+ upload_path="https://nextcloud.kaminsky.me/remote.php/webdav/android-logcat/$log_filename"
+ adb logcat -d | gzip > "$log_file"
+ curl -u "${LOG_USERNAME}:${LOG_PASSWORD}" -X PUT "$upload_path" --upload-file "$log_file"
+ echo >&2 "Uploaded logcat to https://kaminsky.me/nc-dev/android-logcat/$log_filename"
+ set +x
+}
+
scripts/deleteOldComments.sh "master" "IT" "$DRONE_PULL_REQUEST"
./gradlew assembleGplayDebugAndroidTest
@@ -13,10 +24,12 @@ scripts/wait_for_emulator.sh
./gradlew installGplayDebugAndroidTest
scripts/wait_for_server.sh "server"
+adb logcat -c
./gradlew createGplayDebugCoverageReport -Pcoverage -Pandroid.testInstrumentationRunnerArguments.notAnnotation=com.owncloud.android.utils.ScreenshotTest
stat=$?
if [ ! $stat -eq 0 ]; then
+ upload_logcat
bash scripts/uploadReport.sh "$LOG_USERNAME" "$LOG_PASSWORD" "$DRONE_BUILD_NUMBER" "master" "IT" "$DRONE_PULL_REQUEST"
fi