runCombinedTest.sh 821 B

123456789101112131415161718192021222324252627282930
  1. #!/bin/bash
  2. GIT_USERNAME=$1
  3. GIT_TOKEN=$2
  4. DRONE_PULL_REQUEST=$3
  5. LOG_USERNAME=$4
  6. LOG_PASSWORD=$5
  7. DRONE_BUILD_NUMBER=$6
  8. scripts/deleteOldComments.sh "master" "IT" $DRONE_PULL_REQUEST $GIT_TOKEN
  9. ./gradlew assembleGplayDebugAndroidTest
  10. scripts/wait_for_emulator.sh
  11. ./gradlew installGplayDebugAndroidTest
  12. scripts/wait_for_server.sh "server"
  13. ./gradlew createGplayDebugCoverageReport -Pcoverage -Pandroid.testInstrumentationRunnerArguments.notAnnotation=com.owncloud.android.utils.ScreenshotTest
  14. stat=$?
  15. if [ ! $stat -eq 0 ]; then
  16. bash scripts/uploadReport.sh $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER "master" "IT" $DRONE_PULL_REQUEST $GIT_TOKEN
  17. fi
  18. curl -Os https://uploader.codecov.io/latest/linux/codecov
  19. chmod +x codecov
  20. ./codecov -t fc506ba4-33c3-43e4-a760-aada38c24fd5
  21. echo "Exit with: " $stat
  22. exit $stat