OSDN Git Service

Clean up the test tags used by the continuous test service to determine which
authorJason Noguchi <jnoguchi@google.com>
Wed, 31 Jul 2013 21:16:31 +0000 (14:16 -0700)
committerJason Noguchi <jnoguchi@google.com>
Fri, 2 Aug 2013 23:31:46 +0000 (16:31 -0700)
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

16 files changed:
tests/src/com/android/gallery3d/exif/ExifDataTest.java
tests/src/com/android/gallery3d/exif/ExifInterfaceTest.java
tests/src/com/android/gallery3d/exif/ExifModifierTest.java
tests/src/com/android/gallery3d/exif/ExifOutputStreamTest.java
tests/src/com/android/gallery3d/exif/ExifParserTest.java
tests/src/com/android/gallery3d/exif/ExifReaderTest.java
tests/src/com/android/gallery3d/exif/ExifTagTest.java
tests/src/com/android/gallery3d/glrenderer/GLCanvasTest.java
tests/src/com/android/gallery3d/glrenderer/TextureTest.java
tests/src/com/android/gallery3d/jpegstream/JpegStreamReaderTest.java
tests/src/com/android/gallery3d/stress/CameraLatency.java
tests/src/com/android/gallery3d/stress/CameraStartUp.java
tests/src/com/android/gallery3d/stress/ImageCapture.java
tests/src/com/android/gallery3d/stress/ShotToShotLatency.java
tests/src/com/android/gallery3d/stress/SwitchPreview.java
tests/src/com/android/gallery3d/stress/VideoCapture.java

index 949f22c..142cc6b 100644 (file)
@@ -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);
 
index af1ccfb..01b2a32 100644 (file)
@@ -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;
index 713a9d9..96f405e 100644 (file)
@@ -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<Short, Boolean> results = new HashMap<Short, Boolean>();
 
index 1286c58..151bdbc 100644 (file)
@@ -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;
index 5c3fd24..247ea02 100644 (file)
@@ -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(),
index a057186..4b5c029 100644 (file)
@@ -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);
index 59067c3..e6a41ec 100644 (file)
@@ -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);
index b1e6d5b..416c114 100644 (file)
@@ -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";
 
index 956d894..9e79554 100644 (file)
@@ -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";
index 2e56145..ae60a91 100644 (file)
@@ -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.
index 7177abe..2cdc2f1 100755 (executable)
@@ -66,7 +66,6 @@ public class CameraLatency extends ActivityInstrumentationTestCase2 <CameraActiv
         super.tearDown();
     }
 
-    @LargeTest
     public void testImageCapture() {
         Log.v(TAG, "start testImageCapture test");
         Instrumentation inst = getInstrumentation();
index 8524465..3ca1632 100644 (file)
@@ -112,7 +112,6 @@ public class CameraStartUp extends InstrumentationTestCase {
         }
     }
 
-    @LargeTest
     public void testLaunchVideo() throws Exception {
         String individualStartupTime;
         individualStartupTime = "Individual Video Startup Time = ";
@@ -133,7 +132,6 @@ public class CameraStartUp extends InstrumentationTestCase {
         writeToOutputFile(totalStartupTime, individualStartupTime, false, "Video");
     }
 
-    @LargeTest
     public void testLaunchCamera() throws Exception {
         String individualStartupTime;
         individualStartupTime = "Individual Camera Startup Time = ";
index e322eb5..5a9ee6a 100755 (executable)
@@ -89,7 +89,6 @@ public class ImageCapture extends ActivityInstrumentationTestCase2 <CameraActivi
         }
     }
 
-    @LargeTest
     public void testBackImageCapture() throws Exception {
         Instrumentation inst = getInstrumentation();
         Intent intent = new Intent();
@@ -104,7 +103,6 @@ public class ImageCapture extends ActivityInstrumentationTestCase2 <CameraActivi
         act.finish();
     }
 
-    @LargeTest
     public void testFrontImageCapture() throws Exception {
         Instrumentation inst = getInstrumentation();
         Intent intent = new Intent();
index a27bd90..0d5749e 100644 (file)
@@ -83,7 +83,6 @@ public class ShotToShotLatency extends ActivityInstrumentationTestCase2<CameraAc
         }
     }
 
-    @LargeTest
     public void testShotToShotLatency() {
         long sigmaOfDiffFromMeanSquared = 0;
         double mean = 0;
index 955d092..3545f3b 100755 (executable)
@@ -86,7 +86,6 @@ public class SwitchPreview extends ActivityInstrumentationTestCase2 <CameraActiv
         }
     }
 
-    @LargeTest
     public void testSwitchMode() {
         //Switching the video and the video recorder mode
         Instrumentation inst = getInstrumentation();
index dbbd124..8211bad 100755 (executable)
@@ -66,7 +66,6 @@ public class VideoCapture extends ActivityInstrumentationTestCase2 <CameraActivi
         super.tearDown();
     }
 
-    @LargeTest
     public void captureVideos(String reportTag, Instrumentation inst) throws Exception{
         boolean memoryResult = false;
         int total_num_of_videos = CameraStressTestRunner.mVideoIterations;
@@ -83,7 +82,6 @@ public class VideoCapture extends ActivityInstrumentationTestCase2 <CameraActivi
         }
     }
 
-    @LargeTest
     public void testBackVideoCapture() throws Exception {
         Instrumentation inst = getInstrumentation();
         Intent intent = new Intent(MediaStore.INTENT_ACTION_VIDEO_CAMERA);
@@ -98,7 +96,6 @@ public class VideoCapture extends ActivityInstrumentationTestCase2 <CameraActivi
         act.finish();
     }
 
-    @LargeTest
     public void testFrontVideoCapture() throws Exception {
         Instrumentation inst = getInstrumentation();
         Intent intent = new Intent(MediaStore.INTENT_ACTION_VIDEO_CAMERA);