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
This commit is contained in:
parent
ac31dc7c7a
commit
f6821c6d95
@ -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].
|
||||
}
|
||||
|
||||
|
@ -162,7 +162,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
||||
|
||||
// H265 CDD.
|
||||
|
||||
public void testH265Fixed() {
|
||||
public void testH265FixedV23() {
|
||||
if (Util.SDK_INT < 23) {
|
||||
// Pass.
|
||||
return;
|
||||
@ -176,8 +176,8 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
||||
.run();
|
||||
}
|
||||
|
||||
public void testH265Adaptive() throws DecoderQueryException {
|
||||
if (Util.SDK_INT < 24 || shouldSkipAdaptiveTest(MimeTypes.VIDEO_H265)) {
|
||||
public void testH265AdaptiveV24() throws DecoderQueryException {
|
||||
if (Util.SDK_INT < 24) {
|
||||
// Pass.
|
||||
return;
|
||||
}
|
||||
@ -191,8 +191,8 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
||||
.run();
|
||||
}
|
||||
|
||||
public void testH265AdaptiveWithSeeking() throws DecoderQueryException {
|
||||
if (Util.SDK_INT < 24 || shouldSkipAdaptiveTest(MimeTypes.VIDEO_H265)) {
|
||||
public void testH265AdaptiveWithSeekingV24() throws DecoderQueryException {
|
||||
if (Util.SDK_INT < 24) {
|
||||
// Pass.
|
||||
return;
|
||||
}
|
||||
@ -207,8 +207,8 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
||||
.run();
|
||||
}
|
||||
|
||||
public void testH265AdaptiveWithRendererDisabling() throws DecoderQueryException {
|
||||
if (Util.SDK_INT < 24 || shouldSkipAdaptiveTest(MimeTypes.VIDEO_H265)) {
|
||||
public void testH265AdaptiveWithRendererDisablingV24() throws DecoderQueryException {
|
||||
if (Util.SDK_INT < 24) {
|
||||
// Pass.
|
||||
return;
|
||||
}
|
||||
@ -225,7 +225,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
||||
|
||||
// VP9 (CDD).
|
||||
|
||||
public void testVp9Fixed360p() {
|
||||
public void testVp9Fixed360pV23() {
|
||||
if (Util.SDK_INT < 23) {
|
||||
// Pass.
|
||||
return;
|
||||
@ -240,8 +240,8 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
||||
.run();
|
||||
}
|
||||
|
||||
public void testVp9Adaptive() throws DecoderQueryException {
|
||||
if (Util.SDK_INT < 24 || shouldSkipAdaptiveTest(MimeTypes.VIDEO_VP9)) {
|
||||
public void testVp9AdaptiveV24() throws DecoderQueryException {
|
||||
if (Util.SDK_INT < 24) {
|
||||
// Pass.
|
||||
return;
|
||||
}
|
||||
@ -255,8 +255,8 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
||||
.run();
|
||||
}
|
||||
|
||||
public void testVp9AdaptiveWithSeeking() throws DecoderQueryException {
|
||||
if (Util.SDK_INT < 24 || shouldSkipAdaptiveTest(MimeTypes.VIDEO_VP9)) {
|
||||
public void testVp9AdaptiveWithSeekingV24() throws DecoderQueryException {
|
||||
if (Util.SDK_INT < 24) {
|
||||
// Pass.
|
||||
return;
|
||||
}
|
||||
@ -271,8 +271,8 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
||||
.run();
|
||||
}
|
||||
|
||||
public void testVp9AdaptiveWithRendererDisabling() throws DecoderQueryException {
|
||||
if (Util.SDK_INT < 24 || shouldSkipAdaptiveTest(MimeTypes.VIDEO_VP9)) {
|
||||
public void testVp9AdaptiveWithRendererDisablingV24() throws DecoderQueryException {
|
||||
if (Util.SDK_INT < 24) {
|
||||
// Pass.
|
||||
return;
|
||||
}
|
||||
@ -290,7 +290,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
||||
// H264: Other frame-rates for output buffer count assertions.
|
||||
|
||||
// 23.976 fps.
|
||||
public void test23FpsH264Fixed() {
|
||||
public void test23FpsH264FixedV23() {
|
||||
if (Util.SDK_INT < 23) {
|
||||
// Pass.
|
||||
return;
|
||||
@ -306,7 +306,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
||||
}
|
||||
|
||||
// 24 fps.
|
||||
public void test24FpsH264Fixed() {
|
||||
public void test24FpsH264FixedV23() {
|
||||
if (Util.SDK_INT < 23) {
|
||||
// Pass.
|
||||
return;
|
||||
@ -322,7 +322,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
||||
}
|
||||
|
||||
// 29.97 fps.
|
||||
public void test29FpsH264Fixed() {
|
||||
public void test29FpsH264FixedV23() {
|
||||
if (Util.SDK_INT < 23) {
|
||||
// Pass.
|
||||
return;
|
||||
@ -340,7 +340,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
||||
// Widevine encrypted media tests.
|
||||
// H264 CDD.
|
||||
|
||||
public void testWidevineH264Fixed() throws DecoderQueryException {
|
||||
public void testWidevineH264FixedV18() throws DecoderQueryException {
|
||||
if (Util.SDK_INT < 18) {
|
||||
// Pass.
|
||||
return;
|
||||
@ -356,7 +356,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
||||
.run();
|
||||
}
|
||||
|
||||
public void testWidevineH264Adaptive() throws DecoderQueryException {
|
||||
public void testWidevineH264AdaptiveV18() throws DecoderQueryException {
|
||||
if (Util.SDK_INT < 18 || shouldSkipAdaptiveTest(MimeTypes.VIDEO_H264)) {
|
||||
// Pass.
|
||||
return;
|
||||
@ -372,7 +372,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
||||
.run();
|
||||
}
|
||||
|
||||
public void testWidevineH264AdaptiveWithSeeking() throws DecoderQueryException {
|
||||
public void testWidevineH264AdaptiveWithSeekingV18() throws DecoderQueryException {
|
||||
if (Util.SDK_INT < 18 || shouldSkipAdaptiveTest(MimeTypes.VIDEO_H264)) {
|
||||
// Pass.
|
||||
return;
|
||||
@ -389,7 +389,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
||||
.run();
|
||||
}
|
||||
|
||||
public void testWidevineH264AdaptiveWithRendererDisabling() throws DecoderQueryException {
|
||||
public void testWidevineH264AdaptiveWithRendererDisablingV18() throws DecoderQueryException {
|
||||
if (Util.SDK_INT < 18 || shouldSkipAdaptiveTest(MimeTypes.VIDEO_H264)) {
|
||||
// Pass.
|
||||
return;
|
||||
@ -408,7 +408,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
||||
|
||||
// H265 CDD.
|
||||
|
||||
public void testWidevineH265Fixed() throws DecoderQueryException {
|
||||
public void testWidevineH265FixedV23() throws DecoderQueryException {
|
||||
if (Util.SDK_INT < 23) {
|
||||
// Pass.
|
||||
return;
|
||||
@ -424,8 +424,8 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
||||
.run();
|
||||
}
|
||||
|
||||
public void testWidevineH265Adaptive() throws DecoderQueryException {
|
||||
if (Util.SDK_INT < 24 || shouldSkipAdaptiveTest(MimeTypes.VIDEO_H265)) {
|
||||
public void testWidevineH265AdaptiveV24() throws DecoderQueryException {
|
||||
if (Util.SDK_INT < 24) {
|
||||
// Pass.
|
||||
return;
|
||||
}
|
||||
@ -440,8 +440,8 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
||||
.run();
|
||||
}
|
||||
|
||||
public void testWidevineH265AdaptiveWithSeeking() throws DecoderQueryException {
|
||||
if (Util.SDK_INT < 24 || shouldSkipAdaptiveTest(MimeTypes.VIDEO_H265)) {
|
||||
public void testWidevineH265AdaptiveWithSeekingV24() throws DecoderQueryException {
|
||||
if (Util.SDK_INT < 24) {
|
||||
// Pass.
|
||||
return;
|
||||
}
|
||||
@ -457,8 +457,8 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
||||
.run();
|
||||
}
|
||||
|
||||
public void testWidevineH265AdaptiveWithRendererDisabling() throws DecoderQueryException {
|
||||
if (Util.SDK_INT < 24 || shouldSkipAdaptiveTest(MimeTypes.VIDEO_H265)) {
|
||||
public void testWidevineH265AdaptiveWithRendererDisablingV24() throws DecoderQueryException {
|
||||
if (Util.SDK_INT < 24) {
|
||||
// Pass.
|
||||
return;
|
||||
}
|
||||
@ -476,7 +476,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
||||
|
||||
// VP9 (CDD).
|
||||
|
||||
public void testWidevineVp9Fixed360p() throws DecoderQueryException {
|
||||
public void testWidevineVp9Fixed360pV23() throws DecoderQueryException {
|
||||
if (Util.SDK_INT < 23) {
|
||||
// Pass.
|
||||
return;
|
||||
@ -492,8 +492,8 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
||||
.run();
|
||||
}
|
||||
|
||||
public void testWidevineVp9Adaptive() throws DecoderQueryException {
|
||||
if (Util.SDK_INT < 24 || shouldSkipAdaptiveTest(MimeTypes.VIDEO_VP9)) {
|
||||
public void testWidevineVp9AdaptiveV24() throws DecoderQueryException {
|
||||
if (Util.SDK_INT < 24) {
|
||||
// Pass.
|
||||
return;
|
||||
}
|
||||
@ -508,8 +508,8 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
||||
.run();
|
||||
}
|
||||
|
||||
public void testWidevineVp9AdaptiveWithSeeking() throws DecoderQueryException {
|
||||
if (Util.SDK_INT < 24 || shouldSkipAdaptiveTest(MimeTypes.VIDEO_VP9)) {
|
||||
public void testWidevineVp9AdaptiveWithSeekingV24() throws DecoderQueryException {
|
||||
if (Util.SDK_INT < 24) {
|
||||
// Pass.
|
||||
return;
|
||||
}
|
||||
@ -525,8 +525,8 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
||||
.run();
|
||||
}
|
||||
|
||||
public void testWidevineVp9AdaptiveWithRendererDisabling() throws DecoderQueryException {
|
||||
if (Util.SDK_INT < 24 || shouldSkipAdaptiveTest(MimeTypes.VIDEO_VP9)) {
|
||||
public void testWidevineVp9AdaptiveWithRendererDisablingV24() throws DecoderQueryException {
|
||||
if (Util.SDK_INT < 24) {
|
||||
// Pass.
|
||||
return;
|
||||
}
|
||||
@ -545,7 +545,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
||||
// H264: Other frame-rates for output buffer count assertions.
|
||||
|
||||
// 23.976 fps.
|
||||
public void testWidevine23FpsH264Fixed() throws DecoderQueryException {
|
||||
public void testWidevine23FpsH264FixedV23() throws DecoderQueryException {
|
||||
if (Util.SDK_INT < 23) {
|
||||
// Pass.
|
||||
return;
|
||||
@ -562,7 +562,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
||||
}
|
||||
|
||||
// 24 fps.
|
||||
public void testWidevine24FpsH264Fixed() throws DecoderQueryException {
|
||||
public void testWidevine24FpsH264FixedV23() throws DecoderQueryException {
|
||||
if (Util.SDK_INT < 23) {
|
||||
// Pass.
|
||||
return;
|
||||
@ -579,7 +579,7 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
||||
}
|
||||
|
||||
// 29.97 fps.
|
||||
public void testWidevine29FpsH264Fixed() throws DecoderQueryException {
|
||||
public void testWidevine29FpsH264FixedV23() throws DecoderQueryException {
|
||||
if (Util.SDK_INT < 23) {
|
||||
// Pass.
|
||||
return;
|
||||
@ -595,16 +595,39 @@ public final class DashStreamingTest extends ActivityInstrumentationTestCase2<Ho
|
||||
.run();
|
||||
}
|
||||
|
||||
// Decoder info.
|
||||
|
||||
public void testDecoderInfoH264() throws DecoderQueryException {
|
||||
if (Util.SDK_INT < 16) {
|
||||
// Pass.
|
||||
return;
|
||||
}
|
||||
MediaCodecInfo decoderInfo = MediaCodecUtil.getDecoderInfo(MimeTypes.VIDEO_H264, false);
|
||||
assertNotNull(decoderInfo);
|
||||
assertTrue(Util.SDK_INT < 21 || decoderInfo.adaptive);
|
||||
}
|
||||
|
||||
public void testDecoderInfoH265V24() throws DecoderQueryException {
|
||||
if (Util.SDK_INT < 24) {
|
||||
// Pass.
|
||||
return;
|
||||
}
|
||||
assertTrue(MediaCodecUtil.getDecoderInfo(MimeTypes.VIDEO_H265, false).adaptive);
|
||||
}
|
||||
|
||||
public void testDecoderInfoVP9V24() throws DecoderQueryException {
|
||||
if (Util.SDK_INT < 24) {
|
||||
// Pass.
|
||||
return;
|
||||
}
|
||||
assertTrue(MediaCodecUtil.getDecoderInfo(MimeTypes.VIDEO_VP9, false).adaptive);
|
||||
}
|
||||
|
||||
// Internal.
|
||||
|
||||
private static boolean shouldSkipAdaptiveTest(String mimeType) throws DecoderQueryException {
|
||||
MediaCodecInfo decoderInfo = MediaCodecUtil.getDecoderInfo(mimeType, false);
|
||||
assertNotNull(decoderInfo);
|
||||
if (decoderInfo.adaptive) {
|
||||
return false;
|
||||
}
|
||||
assertTrue(Util.SDK_INT < 21);
|
||||
return true;
|
||||
return decoderInfo == null || !decoderInfo.adaptive;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ public final class DashWidevineOfflineTest extends ActivityInstrumentationTestCa
|
||||
|
||||
// Offline license tests
|
||||
|
||||
public void testWidevineOfflineLicense() throws Exception {
|
||||
public void testWidevineOfflineLicenseV22() throws Exception {
|
||||
if (Util.SDK_INT < 22) {
|
||||
return; // Pass.
|
||||
}
|
||||
@ -101,7 +101,7 @@ public final class DashWidevineOfflineTest extends ActivityInstrumentationTestCa
|
||||
Assert.assertNotNull(offlineLicenseKeySetId);
|
||||
}
|
||||
|
||||
public void testWidevineOfflineReleasedLicense() throws Throwable {
|
||||
public void testWidevineOfflineReleasedLicenseV22() throws Throwable {
|
||||
if (Util.SDK_INT < 22) {
|
||||
return; // Pass.
|
||||
}
|
||||
@ -127,7 +127,7 @@ public final class DashWidevineOfflineTest extends ActivityInstrumentationTestCa
|
||||
}
|
||||
}
|
||||
|
||||
public void testWidevineOfflineExpiredLicense() throws Exception {
|
||||
public void testWidevineOfflineExpiredLicenseV22() throws Exception {
|
||||
if (Util.SDK_INT < 22) {
|
||||
return; // Pass.
|
||||
}
|
||||
@ -152,7 +152,7 @@ public final class DashWidevineOfflineTest extends ActivityInstrumentationTestCa
|
||||
testRunner.run();
|
||||
}
|
||||
|
||||
public void testWidevineOfflineLicenseExpiresOnPause() throws Exception {
|
||||
public void testWidevineOfflineLicenseExpiresOnPauseV22() throws Exception {
|
||||
if (Util.SDK_INT < 22) {
|
||||
return; // Pass.
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user