Created
April 26, 2016 14:06
-
-
Save jordifierro/41ed328fb55280604ac945b375d25e2f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
exec 5>&1 | |
androidTestResult=$(adb shell "am instrument -w \ | |
com.jordifierro.androidbase.presentation.test/\ | |
com.jordifierro.androidbase.presentation.TestMockerRunner ; printf \"$?\"" \ | |
| tee /dev/fd/5) | |
exitCode=$(printf "%s" "$androidTestResult" | tail -1) | |
if [ "$exitCode" != "0" ]; then | |
echo "\nStatus code error!" | |
exit 1 | |
fi | |
if echo "$androidTestResult" | grep -q -e "Error" -e "Process crashed"; then | |
echo "\nSome error ocurred!" | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment