mirror of
https://github.com/samsonjs/media.git
synced 2026-04-20 13:45:47 +00:00
Refine test skipping logic
Skip wearable devices, which don't have the same CDD requirements on codecs from Android 5 (API 21). Limit an existing skipping case to pre API 33 devices, so that we can catch failures on Android 13 (API 33) onwards, and add OnePlus 9 Pro which also times out calculating SSIM. Remove TODOs for removing test/SSIM skipping now they are restricted to API version. PiperOrigin-RevId: 581985554
This commit is contained in:
parent
c00161fb8f
commit
1b13c87825
2 changed files with 22 additions and 21 deletions
|
|
@ -84,11 +84,11 @@ public class ExportTest {
|
|||
.build();
|
||||
MediaItem mediaItem =
|
||||
MediaItem.fromUri(Uri.parse(MP4_ASSET_WITH_INCREASING_TIMESTAMPS_URI_STRING));
|
||||
// TODO: b/239983127 - Make requestCalculateSsim always true.
|
||||
boolean requestCalculateSsim =
|
||||
!Util.MODEL.equals("SM-F711U1") && !Util.MODEL.equals("SM-F926U1");
|
||||
boolean skipCalculateSsim =
|
||||
(Util.SDK_INT < 33 && (Util.MODEL.equals("SM-F711U1") || Util.MODEL.equals("SM-F926U1")))
|
||||
|| (Util.SDK_INT == 33 && Util.MODEL.equals("LE2121"));
|
||||
new TransformerAndroidTestRunner.Builder(context, transformer)
|
||||
.setRequestCalculateSsim(requestCalculateSsim)
|
||||
.setRequestCalculateSsim(!skipCalculateSsim)
|
||||
.build()
|
||||
.run(testId, mediaItem);
|
||||
}
|
||||
|
|
@ -128,11 +128,11 @@ public class ExportTest {
|
|||
MediaItem.fromUri(Uri.parse(MP4_ASSET_WITH_INCREASING_TIMESTAMPS_URI_STRING));
|
||||
EditedMediaItem editedMediaItem =
|
||||
new EditedMediaItem.Builder(mediaItem).setRemoveAudio(true).build();
|
||||
// TODO: b/239983127 - Make requestCalculateSsim always true.
|
||||
boolean requestCalculateSsim =
|
||||
!Util.MODEL.equals("SM-F711U1") && !Util.MODEL.equals("SM-F926U1");
|
||||
boolean skipCalculateSsim =
|
||||
(Util.SDK_INT < 33 && (Util.MODEL.equals("SM-F711U1") || Util.MODEL.equals("SM-F926U1")))
|
||||
|| (Util.SDK_INT == 33 && Util.MODEL.equals("LE2121"));
|
||||
new TransformerAndroidTestRunner.Builder(context, transformer)
|
||||
.setRequestCalculateSsim(requestCalculateSsim)
|
||||
.setRequestCalculateSsim(!skipCalculateSsim)
|
||||
.build()
|
||||
.run(testId, editedMediaItem);
|
||||
}
|
||||
|
|
@ -254,11 +254,11 @@ public class ExportTest {
|
|||
MediaItem.fromUri(Uri.parse(MP4_ASSET_WITH_INCREASING_TIMESTAMPS_URI_STRING));
|
||||
EditedMediaItem editedMediaItem =
|
||||
new EditedMediaItem.Builder(mediaItem).setRemoveAudio(true).build();
|
||||
// TODO: b/239983127 - Make requestCalculateSsim always true.
|
||||
boolean requestCalculateSsim =
|
||||
!Util.MODEL.equals("SM-F711U1") && !Util.MODEL.equals("SM-F926U1");
|
||||
boolean skipCalculateSsim =
|
||||
(Util.SDK_INT < 33 && (Util.MODEL.equals("SM-F711U1") || Util.MODEL.equals("SM-F926U1")))
|
||||
|| (Util.SDK_INT == 33 && Util.MODEL.equals("LE2121"));
|
||||
new TransformerAndroidTestRunner.Builder(context, transformer)
|
||||
.setRequestCalculateSsim(requestCalculateSsim)
|
||||
.setRequestCalculateSsim(!skipCalculateSsim)
|
||||
.build()
|
||||
.run(testId, editedMediaItem);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
package androidx.media3.transformer.mh;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static org.junit.Assume.assumeTrue;
|
||||
import static org.junit.Assume.assumeFalse;
|
||||
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
|
|
@ -52,9 +52,9 @@ public final class TranscodeQualityTest {
|
|||
/* outputFormat= */ AndroidTestUtil.MP4_ASSET_WITH_INCREASING_TIMESTAMPS_FORMAT)) {
|
||||
return;
|
||||
}
|
||||
// TODO: b/239983127 - Remove this test skip on these devices.
|
||||
assumeTrue(!Util.MODEL.equals("SM-F711U1") && !Util.MODEL.equals("SM-F926U1"));
|
||||
|
||||
assumeFalse(
|
||||
(Util.SDK_INT < 33 && (Util.MODEL.equals("SM-F711U1") || Util.MODEL.equals("SM-F926U1")))
|
||||
|| (Util.SDK_INT == 33 && Util.MODEL.equals("LE2121")));
|
||||
Transformer transformer =
|
||||
new Transformer.Builder(context)
|
||||
.setVideoMimeType(MimeTypes.VIDEO_H264)
|
||||
|
|
@ -98,9 +98,9 @@ public final class TranscodeQualityTest {
|
|||
.build())) {
|
||||
return;
|
||||
}
|
||||
// TODO: b/239983127 - Remove this test skip on these devices.
|
||||
assumeTrue(!Util.MODEL.equals("SM-F711U1") && !Util.MODEL.equals("SM-F926U1"));
|
||||
|
||||
assumeFalse(
|
||||
(Util.SDK_INT < 33 && (Util.MODEL.equals("SM-F711U1") || Util.MODEL.equals("SM-F926U1")))
|
||||
|| (Util.SDK_INT == 33 && Util.MODEL.equals("LE2121")));
|
||||
Transformer transformer =
|
||||
new Transformer.Builder(context).setVideoMimeType(MimeTypes.VIDEO_H265).build();
|
||||
MediaItem mediaItem =
|
||||
|
|
@ -125,8 +125,9 @@ public final class TranscodeQualityTest {
|
|||
Context context = ApplicationProvider.getApplicationContext();
|
||||
String testId = "transcodeAvcToAvc320x240_ssim";
|
||||
|
||||
// Note: We never skip this test as the input and output formats should be within CDD
|
||||
// requirements on all supported API versions.
|
||||
// Don't skip based on format support as input and output formats should be within CDD
|
||||
// requirements on all supported API versions, except for wearable devices.
|
||||
assumeFalse(Util.isWear(context));
|
||||
|
||||
Transformer transformer =
|
||||
new Transformer.Builder(context)
|
||||
|
|
|
|||
Loading…
Reference in a new issue