How to write a Git pre-commit hook that prevents committing of an Android project if the test project fails?
Given that I in my workspace I have an android project MyAndroidProject and my tests project MyAndroidProjectTests directories how could I write a pre-commit git hook that will run the tests in the MyAndroidProjectTests and refuse to commit any code changes if the tests fail? When I run tests on the terminal they usually have output like this: com.mydomain.tests.Models.MyProjectTests:....... Test results for InstrumentationTestRunner=....... Time: 0.05 OK (10 tests) What I'm unsure about is how to what to use to try to determine if the tests passed or failed other than parsing the output of