aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/src/org/cyanogenmod/tests/power/unit/PerfomanceManagerTest.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/src/org/cyanogenmod/tests/power/unit/PerfomanceManagerTest.java b/tests/src/org/cyanogenmod/tests/power/unit/PerfomanceManagerTest.java
index 7b00a5c..7bc3430 100644
--- a/tests/src/org/cyanogenmod/tests/power/unit/PerfomanceManagerTest.java
+++ b/tests/src/org/cyanogenmod/tests/power/unit/PerfomanceManagerTest.java
@@ -17,6 +17,8 @@ package org.cyanogenmod.tests.power.unit;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
+
+import cyanogenmod.app.CMContextConstants;
import cyanogenmod.power.IPerformanceManager;
import cyanogenmod.power.PerformanceManager;
@@ -34,6 +36,9 @@ public class PerfomanceManagerTest extends AndroidTestCase {
@Override
protected void setUp() throws Exception {
super.setUp();
+ // Only run this if we support performance abstraction
+ org.junit.Assume.assumeTrue(mContext.getPackageManager().hasSystemFeature(
+ CMContextConstants.Features.PERFORMANCE));
mCMPerformanceManager = PerformanceManager.getInstance(mContext);
// Save the perf profile for later restore.
mSavedPerfProfile = mCMPerformanceManager.getPowerProfile();