From f40d4fbbbeb8e972114c41078e038fbbe0e5b083 Mon Sep 17 00:00:00 2001 From: Jason Noguchi Date: Wed, 31 Jul 2013 14:16:31 -0700 Subject: Clean up the test tags used by the continuous test service to determine which tests to run on every dev build. Add SmallTest or MediumTest tags for unit tests that are currently being skipped and remove LargeTest tags from long running stress tests which are not necessary in this context. Change-Id: I2d3db31b0800dcbed42c881c5eaa589517fd9f87 --- tests/src/com/android/gallery3d/exif/ExifDataTest.java | 3 ++- tests/src/com/android/gallery3d/exif/ExifInterfaceTest.java | 6 ++++++ tests/src/com/android/gallery3d/exif/ExifModifierTest.java | 2 ++ tests/src/com/android/gallery3d/exif/ExifOutputStreamTest.java | 4 ++++ tests/src/com/android/gallery3d/exif/ExifParserTest.java | 9 +++++++++ tests/src/com/android/gallery3d/exif/ExifReaderTest.java | 3 +++ tests/src/com/android/gallery3d/exif/ExifTagTest.java | 3 +++ tests/src/com/android/gallery3d/glrenderer/GLCanvasTest.java | 1 - tests/src/com/android/gallery3d/glrenderer/TextureTest.java | 1 - .../com/android/gallery3d/jpegstream/JpegStreamReaderTest.java | 3 +++ tests/src/com/android/gallery3d/stress/CameraLatency.java | 1 - tests/src/com/android/gallery3d/stress/CameraStartUp.java | 2 -- tests/src/com/android/gallery3d/stress/ImageCapture.java | 2 -- tests/src/com/android/gallery3d/stress/ShotToShotLatency.java | 1 - tests/src/com/android/gallery3d/stress/SwitchPreview.java | 1 - tests/src/com/android/gallery3d/stress/VideoCapture.java | 3 --- 16 files changed, 32 insertions(+), 13 deletions(-) diff --git a/tests/src/com/android/gallery3d/exif/ExifDataTest.java b/tests/src/com/android/gallery3d/exif/ExifDataTest.java index 949f22c49..142cc6bf6 100644 --- a/tests/src/com/android/gallery3d/exif/ExifDataTest.java +++ b/tests/src/com/android/gallery3d/exif/ExifDataTest.java @@ -16,8 +16,8 @@ package com.android.gallery3d.exif; +import android.test.suitebuilder.annotation.SmallTest; import junit.framework.TestCase; - import java.nio.ByteOrder; import java.util.HashMap; import java.util.List; @@ -90,6 +90,7 @@ public class ExifDataTest extends TestCase { mTestTags = null; } + @SmallTest public void testAddTag() { ExifData exifData = new ExifData(ByteOrder.BIG_ENDIAN); diff --git a/tests/src/com/android/gallery3d/exif/ExifInterfaceTest.java b/tests/src/com/android/gallery3d/exif/ExifInterfaceTest.java index af1ccfb3f..01b2a323e 100644 --- a/tests/src/com/android/gallery3d/exif/ExifInterfaceTest.java +++ b/tests/src/com/android/gallery3d/exif/ExifInterfaceTest.java @@ -19,6 +19,8 @@ package com.android.gallery3d.exif; import android.graphics.Bitmap; import android.graphics.BitmapFactory; +import android.test.suitebuilder.annotation.MediumTest; + import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; @@ -58,6 +60,7 @@ public class ExifInterfaceTest extends ExifXmlDataTestCase { super(imagePath, xmlPath); } + @MediumTest public void testInterface() throws Exception { InputStream imageInputStream = null; @@ -138,6 +141,7 @@ public class ExifInterfaceTest extends ExifXmlDataTestCase { } } + @MediumTest public void testInterfaceModify() throws Exception { // TODO: This test is dependent on galaxy_nexus jpeg/xml file. @@ -227,6 +231,7 @@ public class ExifInterfaceTest extends ExifXmlDataTestCase { } } + @MediumTest public void testInterfaceDefines() throws Exception { InputStream imageInputStream = null; @@ -365,6 +370,7 @@ public class ExifInterfaceTest extends ExifXmlDataTestCase { } } + @MediumTest public void testInterfaceThumbnails() throws Exception { InputStream imageInputStream = null; diff --git a/tests/src/com/android/gallery3d/exif/ExifModifierTest.java b/tests/src/com/android/gallery3d/exif/ExifModifierTest.java index 713a9d94f..96f405ef6 100644 --- a/tests/src/com/android/gallery3d/exif/ExifModifierTest.java +++ b/tests/src/com/android/gallery3d/exif/ExifModifierTest.java @@ -16,6 +16,7 @@ package com.android.gallery3d.exif; +import android.test.suitebuilder.annotation.MediumTest; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; @@ -108,6 +109,7 @@ public class ExifModifierTest extends ExifXmlDataTestCase { mInterface = new ExifInterface(); } + @MediumTest public void testModify() throws Exception { Map results = new HashMap(); diff --git a/tests/src/com/android/gallery3d/exif/ExifOutputStreamTest.java b/tests/src/com/android/gallery3d/exif/ExifOutputStreamTest.java index 1286c5801..151bdbc99 100644 --- a/tests/src/com/android/gallery3d/exif/ExifOutputStreamTest.java +++ b/tests/src/com/android/gallery3d/exif/ExifOutputStreamTest.java @@ -16,6 +16,8 @@ package com.android.gallery3d.exif; +import android.test.suitebuilder.annotation.MediumTest; + import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.util.Log; @@ -49,6 +51,7 @@ public class ExifOutputStreamTest extends ExifXmlDataTestCase { mInterface = new ExifInterface(); } + @MediumTest public void testExifOutputStream() throws Exception { InputStream imageInputStream = null; InputStream exifInputStream = null; @@ -132,6 +135,7 @@ public class ExifOutputStreamTest extends ExifXmlDataTestCase { } } + @MediumTest public void testOutputSpeed() throws Exception { final String LOGTAG = "testOutputSpeed"; InputStream imageInputStream = null; diff --git a/tests/src/com/android/gallery3d/exif/ExifParserTest.java b/tests/src/com/android/gallery3d/exif/ExifParserTest.java index 5c3fd24ef..247ea022b 100644 --- a/tests/src/com/android/gallery3d/exif/ExifParserTest.java +++ b/tests/src/com/android/gallery3d/exif/ExifParserTest.java @@ -16,6 +16,8 @@ package com.android.gallery3d.exif; +import android.test.suitebuilder.annotation.MediumTest; + import android.graphics.Bitmap; import android.graphics.BitmapFactory; @@ -45,6 +47,7 @@ public class ExifParserTest extends ExifXmlDataTestCase { mGroundTruth = ExifXmlReader.readXml(getXmlParser()); } + @MediumTest public void testParse() throws Exception { try { ExifParser parser = ExifParser.parse(getImageInputStream(), mInterface); @@ -138,22 +141,27 @@ public class ExifParserTest extends ExifXmlDataTestCase { } } + @MediumTest public void testOnlyExifIfd() throws Exception { parseOneIfd(IfdId.TYPE_IFD_EXIF, ExifParser.OPTION_IFD_EXIF); } + @MediumTest public void testOnlyIfd0() throws Exception { parseOneIfd(IfdId.TYPE_IFD_0, ExifParser.OPTION_IFD_0); } + @MediumTest public void testOnlyIfd1() throws Exception { parseOneIfd(IfdId.TYPE_IFD_1, ExifParser.OPTION_IFD_1); } + @MediumTest public void testOnlyInteroperabilityIfd() throws Exception { parseOneIfd(IfdId.TYPE_IFD_INTEROPERABILITY, ExifParser.OPTION_IFD_INTEROPERABILITY); } + @MediumTest public void testOnlyReadSomeTag() throws Exception { // Do not do this test if there is no model tag. if (mGroundTruth.get(IfdId.TYPE_IFD_0).get(ExifInterface.TAG_MODEL) == null) { @@ -197,6 +205,7 @@ public class ExifParserTest extends ExifXmlDataTestCase { } } + @MediumTest public void testReadThumbnail() throws Exception { try { ExifParser parser = ExifParser.parse(getImageInputStream(), diff --git a/tests/src/com/android/gallery3d/exif/ExifReaderTest.java b/tests/src/com/android/gallery3d/exif/ExifReaderTest.java index a05718626..4b5c02941 100644 --- a/tests/src/com/android/gallery3d/exif/ExifReaderTest.java +++ b/tests/src/com/android/gallery3d/exif/ExifReaderTest.java @@ -16,6 +16,8 @@ package com.android.gallery3d.exif; +import android.test.suitebuilder.annotation.MediumTest; + import android.graphics.BitmapFactory; import java.util.List; @@ -43,6 +45,7 @@ public class ExifReaderTest extends ExifXmlDataTestCase { mInterface = new ExifInterface(); } + @MediumTest public void testRead() throws Exception { try { ExifReader reader = new ExifReader(mInterface); diff --git a/tests/src/com/android/gallery3d/exif/ExifTagTest.java b/tests/src/com/android/gallery3d/exif/ExifTagTest.java index 59067c3fe..e6a41ecfa 100644 --- a/tests/src/com/android/gallery3d/exif/ExifTagTest.java +++ b/tests/src/com/android/gallery3d/exif/ExifTagTest.java @@ -16,6 +16,8 @@ package com.android.gallery3d.exif; +import android.test.suitebuilder.annotation.SmallTest; + import junit.framework.TestCase; import java.util.HashMap; @@ -92,6 +94,7 @@ public class ExifTagTest extends TestCase { mTestTags = null; } + @SmallTest public void testValueType() { for (ExifTag tag : mTestTags.values()) { assertTrue(tag != null); diff --git a/tests/src/com/android/gallery3d/glrenderer/GLCanvasTest.java b/tests/src/com/android/gallery3d/glrenderer/GLCanvasTest.java index b1e6d5b20..416c11414 100644 --- a/tests/src/com/android/gallery3d/glrenderer/GLCanvasTest.java +++ b/tests/src/com/android/gallery3d/glrenderer/GLCanvasTest.java @@ -26,7 +26,6 @@ import java.util.Arrays; import javax.microedition.khronos.opengles.GL10; import javax.microedition.khronos.opengles.GL11; -@SmallTest public class GLCanvasTest extends TestCase { private static final String TAG = "GLCanvasTest"; diff --git a/tests/src/com/android/gallery3d/glrenderer/TextureTest.java b/tests/src/com/android/gallery3d/glrenderer/TextureTest.java index 956d89478..9e7955418 100644 --- a/tests/src/com/android/gallery3d/glrenderer/TextureTest.java +++ b/tests/src/com/android/gallery3d/glrenderer/TextureTest.java @@ -31,7 +31,6 @@ import junit.framework.TestCase; import javax.microedition.khronos.opengles.GL11; -@SmallTest public class TextureTest extends TestCase { @SuppressWarnings("unused") private static final String TAG = "TextureTest"; diff --git a/tests/src/com/android/gallery3d/jpegstream/JpegStreamReaderTest.java b/tests/src/com/android/gallery3d/jpegstream/JpegStreamReaderTest.java index 2e56145cf..ae60a91a7 100644 --- a/tests/src/com/android/gallery3d/jpegstream/JpegStreamReaderTest.java +++ b/tests/src/com/android/gallery3d/jpegstream/JpegStreamReaderTest.java @@ -16,6 +16,8 @@ package com.android.gallery3d.jpegstream; +import android.test.suitebuilder.annotation.MediumTest; + import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Point; @@ -59,6 +61,7 @@ public class JpegStreamReaderTest extends JpegStreamTestCase { } } + @MediumTest public void testBasicReads() throws Exception { // Setup input stream. diff --git a/tests/src/com/android/gallery3d/stress/CameraLatency.java b/tests/src/com/android/gallery3d/stress/CameraLatency.java index 7177abe6c..2cdc2f1b7 100755 --- a/tests/src/com/android/gallery3d/stress/CameraLatency.java +++ b/tests/src/com/android/gallery3d/stress/CameraLatency.java @@ -66,7 +66,6 @@ public class CameraLatency extends ActivityInstrumentationTestCase2