From f6821c6d9597389e71a61b3722f2b3d6a1d43b3e Mon Sep 17 00:00:00 2001 From: tonihei Date: Tue, 17 Oct 2017 03:48:15 -0700 Subject: [PATCH] Split playbacktests mobile_test into multiple version-dependent test targets. MobileHarness allocates random devices for each test and repeats tests up to 5 times to account for spurious test failures. Some of our tests automatically pass for SDK versions below a certain threshold. Thus, even if such a version-guarded test would always fail, the MobileHarness test is likely to succeed as it only needs one random allocation to a device with a lower SDK version. To prevent this behaviour and to make sure all tests are actually run, the mobile_test target is split into multiple targets one for each minimum SDK version. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=172447046 --- .../gts/CommonEncryptionDrmTest.java | 8 +- .../playbacktests/gts/DashStreamingTest.java | 111 +++++++++++------- .../gts/DashWidevineOfflineTest.java | 8 +- 3 files changed, 75 insertions(+), 52 deletions(-) diff --git a/playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/CommonEncryptionDrmTest.java b/playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/CommonEncryptionDrmTest.java index a590e45f5f..a4cd35911b 100644 --- a/playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/CommonEncryptionDrmTest.java +++ b/playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/CommonEncryptionDrmTest.java @@ -67,7 +67,7 @@ public final class CommonEncryptionDrmTest extends ActivityInstrumentationTestCa super.tearDown(); } - public void testCencSchemeType() { + public void testCencSchemeTypeV18() { if (Util.SDK_INT < 18) { // Pass. return; @@ -75,7 +75,7 @@ public final class CommonEncryptionDrmTest extends ActivityInstrumentationTestCa testRunner.setStreamName("test_widevine_h264_scheme_cenc").setManifestUrl(URL_cenc).run(); } - public void testCbc1SchemeType() { + public void testCbc1SchemeTypeV25() { if (Util.SDK_INT < 25) { // cbc1 support was added in API 24, but it is stable from API 25 onwards. // See [internal: b/65634809]. @@ -85,7 +85,7 @@ public final class CommonEncryptionDrmTest extends ActivityInstrumentationTestCa testRunner.setStreamName("test_widevine_h264_scheme_cbc1").setManifestUrl(URL_cbc1).run(); } - public void testCbcsSchemeType() { + public void testCbcsSchemeTypeV25() { if (Util.SDK_INT < 25) { // cbcs support was added in API 24, but it is stable from API 25 onwards. // See [internal: b/65634809]. @@ -95,7 +95,7 @@ public final class CommonEncryptionDrmTest extends ActivityInstrumentationTestCa testRunner.setStreamName("test_widevine_h264_scheme_cbcs").setManifestUrl(URL_cbcs).run(); } - public void testCensSchemeType() { + public void testCensSchemeTypeV25() { // TODO: Implement once content is available. Track [internal: b/31219813]. } diff --git a/playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/DashStreamingTest.java b/playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/DashStreamingTest.java index 39cdc7ee43..3748779b9d 100644 --- a/playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/DashStreamingTest.java +++ b/playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/DashStreamingTest.java @@ -162,7 +162,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2