Home | History | Annotate | Download | only in mediaframeworktest
      1 /*
      2  * Copyright (C) 2008 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 package com.android.mediaframeworktest;
     18 
     19 import com.android.mediaframeworktest.performance.MediaPlayerPerformance;
     20 /*Video Editor performance Test cases*/
     21 import com.android.mediaframeworktest.performance.VideoEditorPerformance;
     22 import junit.framework.TestSuite;
     23 
     24 import android.os.Bundle;
     25 import android.test.InstrumentationTestRunner;
     26 import android.test.InstrumentationTestSuite;
     27 import android.util.Log;
     28 
     29 /**
     30  * Instrumentation Test Runner for all MediaPlayer tests.
     31  *
     32  * Running all tests:
     33  *
     34  * adb shell am instrument \
     35  *   -w com.android.smstests.MediaPlayerInstrumentationTestRunner
     36  */
     37 
     38 public class MediaFrameworkPerfTestRunner extends InstrumentationTestRunner {
     39 
     40     public static boolean mGetNativeHeapDump = false;
     41     public static boolean mGetProcmem = false;
     42 
     43     @Override
     44     public TestSuite getAllTests() {
     45         TestSuite suite = new InstrumentationTestSuite(this);
     46         suite.addTestSuite(MediaPlayerPerformance.class);
     47         /* Video Editor performance Test cases */
     48         suite.addTestSuite(VideoEditorPerformance.class);
     49         return suite;
     50     }
     51 
     52     @Override
     53     public ClassLoader getLoader() {
     54         return MediaFrameworkTestRunner.class.getClassLoader();
     55     }
     56 
     57     @Override
     58     public void onCreate(Bundle icicle) {
     59         super.onCreate(icicle);
     60         String get_heap_dump = (String) icicle.get("get_heap_dump");
     61         if (get_heap_dump != null) {
     62             mGetNativeHeapDump = true;
     63         }
     64 
     65         String get_procmem = (String) icicle.get("get_procmem");
     66         if (get_procmem != null) {
     67             mGetProcmem = true;
     68         }
     69 
     70     }
     71 }
     72 
     73