CtsMediaBitstreamsTestCases: bitstreams package via annotation am: 6ca2a7dded
am: e8a3487b0c
Change-Id: If1ba7522f3932ceb3a9266a9f1e0535389627cd2
diff --git a/hostsidetests/media/bitstreams/AndroidTest.xml b/hostsidetests/media/bitstreams/AndroidTest.xml
index 71c8519..21b59cd 100644
--- a/hostsidetests/media/bitstreams/AndroidTest.xml
+++ b/hostsidetests/media/bitstreams/AndroidTest.xml
@@ -25,8 +25,11 @@
</target_preparer>
<test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
<option name="jar" value="CtsMediaBitstreamsTestCases.jar" />
- <option name="runtime-hint" value="4h50m" />
+ <option name="runtime-hint" value="5h6m" />
<!-- shard-unit must be class -->
<option name="shard-unit" value="class" />
+ <!-- remove exclude-annotation option and use include-annotation
+ android.media.cts.bitstreams.FullPackage instead to run full package -->
+ <option name="exclude-annotation" value="android.media.cts.bitstreams.FullPackage" />
</test>
</configuration>
diff --git a/hostsidetests/media/bitstreams/common/src/android/media/cts/bitstreams/MediaBitstreams.java b/hostsidetests/media/bitstreams/common/src/android/media/cts/bitstreams/MediaBitstreams.java
index 774e5be..13b70a5 100644
--- a/hostsidetests/media/bitstreams/common/src/android/media/cts/bitstreams/MediaBitstreams.java
+++ b/hostsidetests/media/bitstreams/common/src/android/media/cts/bitstreams/MediaBitstreams.java
@@ -60,6 +60,7 @@
public static final String DYNAMIC_CONFIG_ENTRY = "entry";
public static final String DYNAMIC_CONFIG_KEY = "key";
public static final String DYNAMIC_CONFIG_VALUE = "value";
+ public static final String DYNAMIC_CONFIG_PACKAGE = "package";
/* utilities */
/**
diff --git a/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/FullPackage.java b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/FullPackage.java
new file mode 100644
index 0000000..376cb8a
--- /dev/null
+++ b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/FullPackage.java
@@ -0,0 +1,12 @@
+package android.media.cts.bitstreams;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ElementType.METHOD, ElementType.TYPE})
+public @interface FullPackage {
+
+}
diff --git a/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/H264Yuv420_8bitBpBitstreamsFullTest.java b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/H264Yuv420_8bitBpBitstreamsFullTest.java
new file mode 100644
index 0000000..457c636
--- /dev/null
+++ b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/H264Yuv420_8bitBpBitstreamsFullTest.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.media.cts.bitstreams;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized.Parameters;
+import org.junit.runners.Parameterized.UseParametersRunnerFactory;
+
+@FullPackage
+@RunWith(DeviceJUnit4Parameterized.class)
+@UseParametersRunnerFactory(DeviceJUnit4ClassRunnerWithParameters.RunnerFactory.class)
+public class H264Yuv420_8bitBpBitstreamsFullTest extends MediaBitstreamsTest {
+
+ @Parameters(name = "{1}")
+ public static Iterable<Object[]> bitstreams() {
+ return MediaBitstreamsTest.bitstreams("h264/yuv420/8bit/bp", BitstreamPackage.FULL);
+ }
+
+ public H264Yuv420_8bitBpBitstreamsFullTest(String prefix, String path,
+ BitstreamPackage pkg, BitstreamPackage packageToRun) {
+ super(prefix, path, pkg, packageToRun);
+ }
+
+ @Test
+ @Override
+ @FullPackage
+ public void testBitstreamsConformance() {
+ super.testBitstreamsConformance();
+ }
+}
diff --git a/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/H264Yuv420_8bitBpBitstreamsTest.java b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/H264Yuv420_8bitBpBitstreamsTest.java
index b1a1c05..78cd436 100644
--- a/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/H264Yuv420_8bitBpBitstreamsTest.java
+++ b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/H264Yuv420_8bitBpBitstreamsTest.java
@@ -25,11 +25,12 @@
@Parameters(name = "{1}")
public static Iterable<Object[]> bitstreams() {
- return MediaBitstreamsTest.bitstreams("h264/yuv420/8bit/bp");
+ return MediaBitstreamsTest.bitstreams("h264/yuv420/8bit/bp", BitstreamPackage.STANDARD);
}
- public H264Yuv420_8bitBpBitstreamsTest(String prefix, String path) {
- super(prefix, path);
+ public H264Yuv420_8bitBpBitstreamsTest(String prefix, String path,
+ BitstreamPackage pkg, BitstreamPackage packageToRun) {
+ super(prefix, path, pkg, packageToRun);
}
}
diff --git a/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/H264Yuv420_8bitHpBitstreamsFullTest.java b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/H264Yuv420_8bitHpBitstreamsFullTest.java
new file mode 100644
index 0000000..606a169
--- /dev/null
+++ b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/H264Yuv420_8bitHpBitstreamsFullTest.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.media.cts.bitstreams;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized.Parameters;
+import org.junit.runners.Parameterized.UseParametersRunnerFactory;
+
+@FullPackage
+@RunWith(DeviceJUnit4Parameterized.class)
+@UseParametersRunnerFactory(DeviceJUnit4ClassRunnerWithParameters.RunnerFactory.class)
+public class H264Yuv420_8bitHpBitstreamsFullTest extends MediaBitstreamsTest {
+
+ @Parameters(name = "{1}")
+ public static Iterable<Object[]> bitstreams() {
+ return MediaBitstreamsTest.bitstreams("h264/yuv420/8bit/hp", BitstreamPackage.FULL);
+ }
+
+ public H264Yuv420_8bitHpBitstreamsFullTest(String prefix, String path,
+ BitstreamPackage pkg, BitstreamPackage packageToRun) {
+ super(prefix, path, pkg, packageToRun);
+ }
+
+ @Test
+ @Override
+ @FullPackage
+ public void testBitstreamsConformance() {
+ super.testBitstreamsConformance();
+ }
+}
diff --git a/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/H264Yuv420_8bitHpBitstreamsTest.java b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/H264Yuv420_8bitHpBitstreamsTest.java
index 4d4d1cb..792fa5e 100644
--- a/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/H264Yuv420_8bitHpBitstreamsTest.java
+++ b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/H264Yuv420_8bitHpBitstreamsTest.java
@@ -25,11 +25,12 @@
@Parameters(name = "{1}")
public static Iterable<Object[]> bitstreams() {
- return MediaBitstreamsTest.bitstreams("h264/yuv420/8bit/hp");
+ return MediaBitstreamsTest.bitstreams("h264/yuv420/8bit/hp", BitstreamPackage.STANDARD);
}
- public H264Yuv420_8bitHpBitstreamsTest(String prefix, String path) {
- super(prefix, path);
+ public H264Yuv420_8bitHpBitstreamsTest(String prefix, String path,
+ BitstreamPackage pkg, BitstreamPackage packageToRun) {
+ super(prefix, path, pkg, packageToRun);
}
}
diff --git a/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/H264Yuv420_8bitMpBitstreamsFullTest.java b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/H264Yuv420_8bitMpBitstreamsFullTest.java
new file mode 100644
index 0000000..ebacc3c
--- /dev/null
+++ b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/H264Yuv420_8bitMpBitstreamsFullTest.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.media.cts.bitstreams;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized.Parameters;
+import org.junit.runners.Parameterized.UseParametersRunnerFactory;
+
+@FullPackage
+@RunWith(DeviceJUnit4Parameterized.class)
+@UseParametersRunnerFactory(DeviceJUnit4ClassRunnerWithParameters.RunnerFactory.class)
+public class H264Yuv420_8bitMpBitstreamsFullTest extends MediaBitstreamsTest {
+
+ @Parameters(name = "{1}")
+ public static Iterable<Object[]> bitstreams() {
+ return MediaBitstreamsTest.bitstreams("h264/yuv420/8bit/mp", BitstreamPackage.FULL);
+ }
+
+ public H264Yuv420_8bitMpBitstreamsFullTest(String prefix, String path,
+ BitstreamPackage pkg, BitstreamPackage packageToRun) {
+ super(prefix, path, pkg, packageToRun);
+ }
+
+ @Test
+ @Override
+ @FullPackage
+ public void testBitstreamsConformance() {
+ super.testBitstreamsConformance();
+ }
+}
diff --git a/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/H264Yuv420_8bitMpBitstreamsTest.java b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/H264Yuv420_8bitMpBitstreamsTest.java
index baa10c1..ce80c96 100644
--- a/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/H264Yuv420_8bitMpBitstreamsTest.java
+++ b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/H264Yuv420_8bitMpBitstreamsTest.java
@@ -25,11 +25,12 @@
@Parameters(name = "{1}")
public static Iterable<Object[]> bitstreams() {
- return MediaBitstreamsTest.bitstreams("h264/yuv420/8bit/mp");
+ return MediaBitstreamsTest.bitstreams("h264/yuv420/8bit/mp", BitstreamPackage.STANDARD);
}
- public H264Yuv420_8bitMpBitstreamsTest(String prefix, String path) {
- super(prefix, path);
+ public H264Yuv420_8bitMpBitstreamsTest(String prefix, String path,
+ BitstreamPackage pkg, BitstreamPackage packageToRun) {
+ super(prefix, path, pkg, packageToRun);
}
}
diff --git a/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/HevcYuv400BitstreamsFullTest.java b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/HevcYuv400BitstreamsFullTest.java
new file mode 100644
index 0000000..59ba131
--- /dev/null
+++ b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/HevcYuv400BitstreamsFullTest.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.media.cts.bitstreams;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized.Parameters;
+import org.junit.runners.Parameterized.UseParametersRunnerFactory;
+
+@FullPackage
+@RunWith(DeviceJUnit4Parameterized.class)
+@UseParametersRunnerFactory(DeviceJUnit4ClassRunnerWithParameters.RunnerFactory.class)
+public class HevcYuv400BitstreamsFullTest extends MediaBitstreamsTest {
+
+ @Parameters(name = "{1}")
+ public static Iterable<Object[]> bitstreams() {
+ return MediaBitstreamsTest.bitstreams("hevc/yuv400", BitstreamPackage.FULL);
+ }
+
+ public HevcYuv400BitstreamsFullTest(String prefix, String path,
+ BitstreamPackage pkg, BitstreamPackage packageToRun) {
+ super(prefix, path, pkg, packageToRun);
+ }
+
+ @Test
+ @Override
+ @FullPackage
+ public void testBitstreamsConformance() {
+ super.testBitstreamsConformance();
+ }
+}
diff --git a/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/HevcYuv400BitstreamsTest.java b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/HevcYuv400BitstreamsTest.java
index 87a045c..68903cf 100644
--- a/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/HevcYuv400BitstreamsTest.java
+++ b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/HevcYuv400BitstreamsTest.java
@@ -25,11 +25,12 @@
@Parameters(name = "{1}")
public static Iterable<Object[]> bitstreams() {
- return MediaBitstreamsTest.bitstreams("hevc/yuv400");
+ return MediaBitstreamsTest.bitstreams("hevc/yuv400", BitstreamPackage.STANDARD);
}
- public HevcYuv400BitstreamsTest(String prefix, String path) {
- super(prefix, path);
+ public HevcYuv400BitstreamsTest(String prefix, String path,
+ BitstreamPackage pkg, BitstreamPackage packageToRun) {
+ super(prefix, path, pkg, packageToRun);
}
}
diff --git a/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/HevcYuv420BitstreamsFullTest.java b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/HevcYuv420BitstreamsFullTest.java
new file mode 100644
index 0000000..1680ff2
--- /dev/null
+++ b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/HevcYuv420BitstreamsFullTest.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.media.cts.bitstreams;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized.Parameters;
+import org.junit.runners.Parameterized.UseParametersRunnerFactory;
+
+@FullPackage
+@RunWith(DeviceJUnit4Parameterized.class)
+@UseParametersRunnerFactory(DeviceJUnit4ClassRunnerWithParameters.RunnerFactory.class)
+public class HevcYuv420BitstreamsFullTest extends MediaBitstreamsTest {
+
+ @Parameters(name = "{1}")
+ public static Iterable<Object[]> bitstreams() {
+ return MediaBitstreamsTest.bitstreams("hevc/yuv420", BitstreamPackage.FULL);
+ }
+
+ public HevcYuv420BitstreamsFullTest(String prefix, String path,
+ BitstreamPackage pkg, BitstreamPackage packageToRun) {
+ super(prefix, path, pkg, packageToRun);
+ }
+
+ @Test
+ @Override
+ @FullPackage
+ public void testBitstreamsConformance() {
+ super.testBitstreamsConformance();
+ }
+}
diff --git a/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/HevcYuv420BitstreamsTest.java b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/HevcYuv420BitstreamsTest.java
index 189b368..0fd0c3c 100644
--- a/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/HevcYuv420BitstreamsTest.java
+++ b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/HevcYuv420BitstreamsTest.java
@@ -25,11 +25,12 @@
@Parameters(name = "{1}")
public static Iterable<Object[]> bitstreams() {
- return MediaBitstreamsTest.bitstreams("hevc/yuv420");
+ return MediaBitstreamsTest.bitstreams("hevc/yuv420", BitstreamPackage.STANDARD);
}
- public HevcYuv420BitstreamsTest(String prefix, String path) {
- super(prefix, path);
+ public HevcYuv420BitstreamsTest(String prefix, String path,
+ BitstreamPackage pkg, BitstreamPackage packageToRun) {
+ super(prefix, path, pkg, packageToRun);
}
}
diff --git a/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/HevcYuv422BitstreamsFullTest.java b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/HevcYuv422BitstreamsFullTest.java
new file mode 100644
index 0000000..ee7a683
--- /dev/null
+++ b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/HevcYuv422BitstreamsFullTest.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.media.cts.bitstreams;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized.Parameters;
+import org.junit.runners.Parameterized.UseParametersRunnerFactory;
+
+@FullPackage
+@RunWith(DeviceJUnit4Parameterized.class)
+@UseParametersRunnerFactory(DeviceJUnit4ClassRunnerWithParameters.RunnerFactory.class)
+public class HevcYuv422BitstreamsFullTest extends MediaBitstreamsTest {
+
+ @Parameters(name = "{1}")
+ public static Iterable<Object[]> bitstreams() {
+ return MediaBitstreamsTest.bitstreams("hevc/yuv422", BitstreamPackage.FULL);
+ }
+
+ public HevcYuv422BitstreamsFullTest(String prefix, String path,
+ BitstreamPackage pkg, BitstreamPackage packageToRun) {
+ super(prefix, path, pkg, packageToRun);
+ }
+
+ @Test
+ @Override
+ @FullPackage
+ public void testBitstreamsConformance() {
+ super.testBitstreamsConformance();
+ }
+}
diff --git a/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/HevcYuv422BitstreamsTest.java b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/HevcYuv422BitstreamsTest.java
index 5cc0131..329932e 100644
--- a/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/HevcYuv422BitstreamsTest.java
+++ b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/HevcYuv422BitstreamsTest.java
@@ -25,11 +25,12 @@
@Parameters(name = "{1}")
public static Iterable<Object[]> bitstreams() {
- return MediaBitstreamsTest.bitstreams("hevc/yuv422");
+ return MediaBitstreamsTest.bitstreams("hevc/yuv422", BitstreamPackage.STANDARD);
}
- public HevcYuv422BitstreamsTest(String prefix, String path) {
- super(prefix, path);
+ public HevcYuv422BitstreamsTest(String prefix, String path,
+ BitstreamPackage pkg, BitstreamPackage packageToRun) {
+ super(prefix, path, pkg, packageToRun);
}
}
diff --git a/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/HevcYuv444BitstreamsFullTest.java b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/HevcYuv444BitstreamsFullTest.java
new file mode 100644
index 0000000..f167cb6
--- /dev/null
+++ b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/HevcYuv444BitstreamsFullTest.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.media.cts.bitstreams;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized.Parameters;
+import org.junit.runners.Parameterized.UseParametersRunnerFactory;
+
+@FullPackage
+@RunWith(DeviceJUnit4Parameterized.class)
+@UseParametersRunnerFactory(DeviceJUnit4ClassRunnerWithParameters.RunnerFactory.class)
+public class HevcYuv444BitstreamsFullTest extends MediaBitstreamsTest {
+
+ @Parameters(name = "{1}")
+ public static Iterable<Object[]> bitstreams() {
+ return MediaBitstreamsTest.bitstreams("hevc/yuv444", BitstreamPackage.FULL);
+ }
+
+ public HevcYuv444BitstreamsFullTest(String prefix, String path,
+ BitstreamPackage pkg, BitstreamPackage packageToRun) {
+ super(prefix, path, pkg, packageToRun);
+ }
+
+ @Test
+ @Override
+ @FullPackage
+ public void testBitstreamsConformance() {
+ super.testBitstreamsConformance();
+ }
+}
diff --git a/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/HevcYuv444BitstreamsTest.java b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/HevcYuv444BitstreamsTest.java
index 38391b5..0c16855 100644
--- a/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/HevcYuv444BitstreamsTest.java
+++ b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/HevcYuv444BitstreamsTest.java
@@ -25,11 +25,12 @@
@Parameters(name = "{1}")
public static Iterable<Object[]> bitstreams() {
- return MediaBitstreamsTest.bitstreams("hevc/yuv444");
+ return MediaBitstreamsTest.bitstreams("hevc/yuv444", BitstreamPackage.STANDARD);
}
- public HevcYuv444BitstreamsTest(String prefix, String path) {
- super(prefix, path);
+ public HevcYuv444BitstreamsTest(String prefix, String path,
+ BitstreamPackage pkg, BitstreamPackage packageToRun) {
+ super(prefix, path, pkg, packageToRun);
}
}
diff --git a/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/MediaBitstreamsTest.java b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/MediaBitstreamsTest.java
index 41cb5c9..4c91e04 100644
--- a/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/MediaBitstreamsTest.java
+++ b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/MediaBitstreamsTest.java
@@ -101,11 +101,13 @@
* Which subset of bitstreams to test
*/
enum BitstreamPackage {
- SMALL,
STANDARD,
FULL,
}
+ private BitstreamPackage mPackage = BitstreamPackage.FULL;
+ private BitstreamPackage mPackageToRun = BitstreamPackage.STANDARD;
+
static class ConformanceEntry {
final String mPath, mCodecName, mStatus;
ConformanceEntry(String path, String codecName, String status) {
@@ -127,7 +129,7 @@
private IAbi mAbi;
private ITestDevice mDevice;
- static Collection<Object[]> bitstreams(String prefix) {
+ static Collection<Object[]> bitstreams(String prefix, BitstreamPackage packageToRun) {
final String dynConfXml = new File("/", MediaBitstreams.DYNAMIC_CONFIG_XML).toString();
try (InputStream is = MediaBitstreamsTest.class.getResourceAsStream(dynConfXml)) {
List<Object[]> entries = new ArrayList<>();
@@ -145,7 +147,32 @@
if (!bitstream.startsWith(prefix)) {
continue;
}
- entries.add(new Object[] {prefix, bitstream});
+ while (parser.next() != XmlPullParser.END_DOCUMENT) {
+ if (parser.getEventType() != XmlPullParser.START_TAG) {
+ continue;
+ }
+ if (MediaBitstreams.DYNAMIC_CONFIG_VALUE.equals(parser.getName())) {
+ parser.next();
+ break;
+ }
+ }
+ String format = parser.getText();
+ String[] kvPairs = format.split(",");
+ BitstreamPackage curPackage = BitstreamPackage.FULL;
+ for (String kvPair : kvPairs) {
+ String[] kv = kvPair.split("=");
+ if (MediaBitstreams.DYNAMIC_CONFIG_PACKAGE.equals(kv[0])) {
+ String packageName = kv[1];
+ try {
+ curPackage = BitstreamPackage.valueOf(packageName.toUpperCase());
+ } catch (Exception e) {
+ CLog.w(e);
+ }
+ }
+ }
+ if (curPackage.compareTo(packageToRun) <= 0) {
+ entries.add(new Object[] {prefix, bitstream, curPackage, packageToRun});
+ }
}
return entries;
} catch (XmlPullParserException | IOException e) {
@@ -154,9 +181,12 @@
}
}
- public MediaBitstreamsTest(String prefix, String path) {
+ public MediaBitstreamsTest(String prefix, String path, BitstreamPackage pkg, BitstreamPackage packageToRun
+ ) {
mPrefix = prefix;
mPath = path;
+ mPackage = pkg;
+ mPackageToRun = packageToRun;
}
@Override
@@ -420,7 +450,7 @@
device,
MediaBitstreams.K_TEST_GET_SUPPORTED_BITSTREAMS,
MediaBitstreams.KEY_SUPPORTED_BITSTREAMS_TXT);
- Collection<Object[]> bitstreams = bitstreams(mPrefix);
+ Collection<Object[]> bitstreams = bitstreams(mPrefix, mPackageToRun);
Set<String> supportedBitstreams = preparer.getSupportedBitstreams();
CLog.i("%d supported bitstreams under %s", supportedBitstreams.size(), prefix);
diff --git a/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/Vp8BitstreamsFullTest.java b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/Vp8BitstreamsFullTest.java
new file mode 100644
index 0000000..7755b4a
--- /dev/null
+++ b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/Vp8BitstreamsFullTest.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.media.cts.bitstreams;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized.Parameters;
+import org.junit.runners.Parameterized.UseParametersRunnerFactory;
+
+@FullPackage
+@RunWith(DeviceJUnit4Parameterized.class)
+@UseParametersRunnerFactory(DeviceJUnit4ClassRunnerWithParameters.RunnerFactory.class)
+public class Vp8BitstreamsFullTest extends MediaBitstreamsTest {
+
+ @Parameters(name = "{1}")
+ public static Iterable<Object[]> bitstreams() {
+ return MediaBitstreamsTest.bitstreams("vp8", BitstreamPackage.FULL);
+ }
+
+ public Vp8BitstreamsFullTest(String prefix, String path,
+ BitstreamPackage pkg, BitstreamPackage packageToRun) {
+ super(prefix, path, pkg, packageToRun);
+ }
+
+ @Test
+ @Override
+ @FullPackage
+ public void testBitstreamsConformance() {
+ super.testBitstreamsConformance();
+ }
+}
diff --git a/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/Vp8BitstreamsTest.java b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/Vp8BitstreamsTest.java
index e7a6cec..de05f93 100644
--- a/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/Vp8BitstreamsTest.java
+++ b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/Vp8BitstreamsTest.java
@@ -25,11 +25,12 @@
@Parameters(name = "{1}")
public static Iterable<Object[]> bitstreams() {
- return MediaBitstreamsTest.bitstreams("vp8");
+ return MediaBitstreamsTest.bitstreams("vp8", BitstreamPackage.STANDARD);
}
- public Vp8BitstreamsTest(String prefix, String path) {
- super(prefix, path);
+ public Vp8BitstreamsTest(String prefix, String path,
+ BitstreamPackage pkg, BitstreamPackage packageToRun) {
+ super(prefix, path, pkg, packageToRun);
}
}
diff --git a/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/Vp9Yuv420BitstreamsFullTest.java b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/Vp9Yuv420BitstreamsFullTest.java
new file mode 100644
index 0000000..747e3a9
--- /dev/null
+++ b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/Vp9Yuv420BitstreamsFullTest.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.media.cts.bitstreams;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized.Parameters;
+import org.junit.runners.Parameterized.UseParametersRunnerFactory;
+
+@FullPackage
+@RunWith(DeviceJUnit4Parameterized.class)
+@UseParametersRunnerFactory(DeviceJUnit4ClassRunnerWithParameters.RunnerFactory.class)
+public class Vp9Yuv420BitstreamsFullTest extends MediaBitstreamsTest {
+
+ @Parameters(name = "{1}")
+ public static Iterable<Object[]> bitstreams() {
+ return MediaBitstreamsTest.bitstreams("vp9/yuv420", BitstreamPackage.FULL);
+ }
+
+ public Vp9Yuv420BitstreamsFullTest(String prefix, String path,
+ BitstreamPackage pkg, BitstreamPackage packageToRun) {
+ super(prefix, path, pkg, packageToRun);
+ }
+
+ @Test
+ @Override
+ @FullPackage
+ public void testBitstreamsConformance() {
+ super.testBitstreamsConformance();
+ }
+}
diff --git a/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/Vp9Yuv420BitstreamsTest.java b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/Vp9Yuv420BitstreamsTest.java
index dde31b8..76af826 100644
--- a/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/Vp9Yuv420BitstreamsTest.java
+++ b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/Vp9Yuv420BitstreamsTest.java
@@ -25,11 +25,12 @@
@Parameters(name = "{1}")
public static Iterable<Object[]> bitstreams() {
- return MediaBitstreamsTest.bitstreams("vp9/yuv420");
+ return MediaBitstreamsTest.bitstreams("vp9/yuv420", BitstreamPackage.STANDARD);
}
- public Vp9Yuv420BitstreamsTest(String prefix, String path) {
- super(prefix, path);
+ public Vp9Yuv420BitstreamsTest(String prefix, String path,
+ BitstreamPackage pkg, BitstreamPackage packageToRun) {
+ super(prefix, path, pkg, packageToRun);
}
}
diff --git a/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/Vp9Yuv422BitstreamsFullTest.java b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/Vp9Yuv422BitstreamsFullTest.java
new file mode 100644
index 0000000..2856e36
--- /dev/null
+++ b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/Vp9Yuv422BitstreamsFullTest.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.media.cts.bitstreams;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized.Parameters;
+import org.junit.runners.Parameterized.UseParametersRunnerFactory;
+
+@FullPackage
+@RunWith(DeviceJUnit4Parameterized.class)
+@UseParametersRunnerFactory(DeviceJUnit4ClassRunnerWithParameters.RunnerFactory.class)
+public class Vp9Yuv422BitstreamsFullTest extends MediaBitstreamsTest {
+
+ @Parameters(name = "{1}")
+ public static Iterable<Object[]> bitstreams() {
+ return MediaBitstreamsTest.bitstreams("vp9/yuv422", BitstreamPackage.FULL);
+ }
+
+ public Vp9Yuv422BitstreamsFullTest(String prefix, String path,
+ BitstreamPackage pkg, BitstreamPackage packageToRun) {
+ super(prefix, path, pkg, packageToRun);
+ }
+
+ @Test
+ @Override
+ @FullPackage
+ public void testBitstreamsConformance() {
+ super.testBitstreamsConformance();
+ }
+}
diff --git a/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/Vp9Yuv422BitstreamsTest.java b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/Vp9Yuv422BitstreamsTest.java
index a04aca4..eeb465a 100644
--- a/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/Vp9Yuv422BitstreamsTest.java
+++ b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/Vp9Yuv422BitstreamsTest.java
@@ -25,11 +25,12 @@
@Parameters(name = "{1}")
public static Iterable<Object[]> bitstreams() {
- return MediaBitstreamsTest.bitstreams("vp9/yuv422");
+ return MediaBitstreamsTest.bitstreams("vp9/yuv422", BitstreamPackage.STANDARD);
}
- public Vp9Yuv422BitstreamsTest(String prefix, String path) {
- super(prefix, path);
+ public Vp9Yuv422BitstreamsTest(String prefix, String path,
+ BitstreamPackage pkg, BitstreamPackage packageToRun) {
+ super(prefix, path, pkg, packageToRun);
}
}
diff --git a/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/Vp9Yuv444BitstreamsFullTest.java b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/Vp9Yuv444BitstreamsFullTest.java
new file mode 100644
index 0000000..46af097
--- /dev/null
+++ b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/Vp9Yuv444BitstreamsFullTest.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.media.cts.bitstreams;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized.Parameters;
+import org.junit.runners.Parameterized.UseParametersRunnerFactory;
+
+@FullPackage
+@RunWith(DeviceJUnit4Parameterized.class)
+@UseParametersRunnerFactory(DeviceJUnit4ClassRunnerWithParameters.RunnerFactory.class)
+public class Vp9Yuv444BitstreamsFullTest extends MediaBitstreamsTest {
+
+ @Parameters(name = "{1}")
+ public static Iterable<Object[]> bitstreams() {
+ return MediaBitstreamsTest.bitstreams("vp9/yuv444", BitstreamPackage.FULL);
+ }
+
+ public Vp9Yuv444BitstreamsFullTest(String prefix, String path,
+ BitstreamPackage pkg, BitstreamPackage packageToRun) {
+ super(prefix, path, pkg, packageToRun);
+ }
+
+ @Test
+ @Override
+ @FullPackage
+ public void testBitstreamsConformance() {
+ super.testBitstreamsConformance();
+ }
+}
diff --git a/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/Vp9Yuv444BitstreamsTest.java b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/Vp9Yuv444BitstreamsTest.java
index dadd1c9..c226173 100644
--- a/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/Vp9Yuv444BitstreamsTest.java
+++ b/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/Vp9Yuv444BitstreamsTest.java
@@ -25,11 +25,12 @@
@Parameters(name = "{1}")
public static Iterable<Object[]> bitstreams() {
- return MediaBitstreamsTest.bitstreams("vp9/yuv444");
+ return MediaBitstreamsTest.bitstreams("vp9/yuv444", BitstreamPackage.STANDARD);
}
- public Vp9Yuv444BitstreamsTest(String prefix, String path) {
- super(prefix, path);
+ public Vp9Yuv444BitstreamsTest(String prefix, String path,
+ BitstreamPackage pkg, BitstreamPackage packageToRun) {
+ super(prefix, path, pkg, packageToRun);
}
}