Commit a955ee5e by huangdarwin Committed by Ian Baker

Test: Add @Ignore to Analysis tests

In ASwB, all Transformer tests can be run by right-clicking on the project and
clicking "Run all tests". We cannot, however, select only some specific test
files within a project (ex. all non-analysis tests) to run tests on.

Add @Ignore to analysis tests, which are not intended to be run anyways
when determining whether Transformer is working on some device. These
tests also don't have proper skipping logic when a device doesn't support a
format, so they can't be run effectively on low-end devices anyways.

This eases manual testing, for example when debugging whether tests all pass
on a device.

When analysis tests are desired to be run, it should be easy to comment out
the @Ignore.

PiperOrigin-RevId: 527289600
parent b96164d6
...@@ -55,6 +55,7 @@ import java.util.HashMap; ...@@ -55,6 +55,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.checkerframework.checker.nullness.qual.MonotonicNonNull; import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.junit.runners.Parameterized; import org.junit.runners.Parameterized;
...@@ -63,6 +64,9 @@ import org.junit.runners.Parameterized.Parameters; ...@@ -63,6 +64,9 @@ import org.junit.runners.Parameterized.Parameters;
/** Instrumentation tests for analysing output bitrate and quality for a given input bitrate. */ /** Instrumentation tests for analysing output bitrate and quality for a given input bitrate. */
@RunWith(Parameterized.class) @RunWith(Parameterized.class)
@Ignore(
"Analysis tests are not used for confirming Transformer is running properly, and not configured"
+ " for this use as they're missing skip checks for unsupported devices.")
public class BitrateAnalysisTest { public class BitrateAnalysisTest {
private static final ImmutableList<String> INPUT_FILES = private static final ImmutableList<String> INPUT_FILES =
ImmutableList.of( ImmutableList.of(
......
...@@ -41,11 +41,15 @@ import java.util.LinkedHashMap; ...@@ -41,11 +41,15 @@ import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.json.JSONObject; import org.json.JSONObject;
import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
/** An analysis test to log encoder capabilities on a device. */ /** An analysis test to log encoder capabilities on a device. */
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
@Ignore(
"Analysis tests are not used for confirming Transformer is running properly, and not configured"
+ " for this use as they're missing skip checks for unsupported devices.")
public class EncoderCapabilityAnalysisTest { public class EncoderCapabilityAnalysisTest {
private static final String CAMCORDER_FORMAT_STRING = "%dx%d@%dfps:%dkbps"; private static final String CAMCORDER_FORMAT_STRING = "%dx%d@%dfps:%dkbps";
......
...@@ -36,6 +36,7 @@ import com.google.common.collect.ImmutableList; ...@@ -36,6 +36,7 @@ import com.google.common.collect.ImmutableList;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import org.checkerframework.checker.nullness.qual.MonotonicNonNull; import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.junit.runners.Parameterized; import org.junit.runners.Parameterized;
...@@ -44,6 +45,9 @@ import org.junit.runners.Parameterized.Parameters; ...@@ -44,6 +45,9 @@ import org.junit.runners.Parameterized.Parameters;
/** Instrumentation tests for analyzing encoder performance settings. */ /** Instrumentation tests for analyzing encoder performance settings. */
@RunWith(Parameterized.class) @RunWith(Parameterized.class)
@Ignore(
"Analysis tests are not used for confirming Transformer is running properly, and not configured"
+ " for this use as they're missing skip checks for unsupported devices.")
public class EncoderPerformanceAnalysisTest { public class EncoderPerformanceAnalysisTest {
private static final ImmutableList<String> INPUT_FILES = private static final ImmutableList<String> INPUT_FILES =
......
...@@ -35,11 +35,15 @@ import com.google.android.exoplayer2.util.Effect; ...@@ -35,11 +35,15 @@ import com.google.android.exoplayer2.util.Effect;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
/** Tests repeated transcoding operations (as a stress test and to help reproduce flakiness). */ /** Tests repeated transcoding operations (as a stress test and to help reproduce flakiness). */
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
@Ignore(
"Analysis tests are not used for confirming Transformer is running properly, and not configured"
+ " for this use as they're missing skip checks for unsupported devices.")
public final class RepeatedTranscodeTest { public final class RepeatedTranscodeTest {
private static final int TRANSCODE_COUNT = 10; private static final int TRANSCODE_COUNT = 10;
......
...@@ -67,6 +67,7 @@ import java.util.ArrayList; ...@@ -67,6 +67,7 @@ import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.junit.runners.Parameterized; import org.junit.runners.Parameterized;
...@@ -79,6 +80,9 @@ import org.junit.runners.Parameterized.Parameters; ...@@ -79,6 +80,9 @@ import org.junit.runners.Parameterized.Parameters;
* <p>SSIM increases monotonically with bitrate. * <p>SSIM increases monotonically with bitrate.
*/ */
@RunWith(Parameterized.class) @RunWith(Parameterized.class)
@Ignore(
"Analysis tests are not used for confirming Transformer is running properly, and not configured"
+ " for this use as they're missing skip checks for unsupported devices.")
public class SsimMapperTest { public class SsimMapperTest {
private static final Splitter FORWARD_SLASH_SPLITTER = Splitter.on('/'); private static final Splitter FORWARD_SLASH_SPLITTER = Splitter.on('/');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment