Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests] Avoid using adb install -r #429

Merged
merged 1 commit into from Feb 10, 2017

Commits on Feb 8, 2017

  1. [tests] Avoid using adb install -r

    @xmcclure and I just spent *hours* trying to figure out why a
    Xamarin.Android unit test was failing on her device, but nowhere else,
    and -- further! -- how when she added *new* tests to the
    `Xamarin.Android.JcwGen_Tests` package, the new tests and new debug
    messages would never appear on `adb logcat`.
    
    The result? An old install. *Apparently*,
    
    	adb install -r bin/TestDebug/Xamarin.Android.JcwGen_Tests-Signed.apk
    
    wasn't actually installing updated file contents.
    
    Manually uninstalling the `Xamarin.Android.JcwGen_Tests` package and
    installing a new `Xamarin.Android.JcwGen_Tests-Signed.apk` resulted in
    all tests passing, as expected.
    
    What this means *to me* is that `adb install -r` *can't be trusted*.
    We pulled our hair out *for hours* trying to figure out why various
    things didn't appear to work at all, and nothing worked because we
    were never getting the new app on her device.
    
    (Insert fuming here.)
    
    Consequently, *avoid* `adb install -r`. Instead, update the
    `$(RunApkTestsDependsOn)` property so that we always call the
    `UndeployUnitTestApks` target before calling the `DeployUnitTestApks`
    target, and update the `DeployUnitTestApks` target to use "normal"
    `adb install` instead of `adb install -r`.
    jonpryor committed Feb 8, 2017
    Copy the full SHA
    7961496 View commit details
    Browse the repository at this point in the history