Merge "CTS fixes for Wear, which don't support backup feature" into oreo-cts-dev am: b63c8f2a57
am: c5a8000de9

Change-Id: I01ee8245bc0c215fdb3459c62bfeaec692a88c17
diff --git a/hostsidetests/backup/src/android/cts/backup/FullbackupRulesHostSideTest.java b/hostsidetests/backup/src/android/cts/backup/FullbackupRulesHostSideTest.java
index 79ec24c..e93c913 100644
--- a/hostsidetests/backup/src/android/cts/backup/FullbackupRulesHostSideTest.java
+++ b/hostsidetests/backup/src/android/cts/backup/FullbackupRulesHostSideTest.java
@@ -19,6 +19,7 @@
 import static org.junit.Assert.assertTrue;
 
 import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+import com.android.tradefed.log.LogUtil.CLog;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -45,6 +46,11 @@
 
     @Test
     public void testNoBackupFolder() throws Exception {
+        if (!mIsBackupSupported) {
+            CLog.i("android.software.backup feature is not supported on this device");
+            return;
+        }
+
         // Generate the files that are going to be backed up.
         checkDeviceTest(FULLBACKUP_TESTS_APP_NAME, FULLBACKUP_DEVICE_TEST_CLASS_NAME,
                 "createFiles");
@@ -70,6 +76,11 @@
 
     @Test
     public void testIncludeExcludeRules() throws Exception {
+        if (!mIsBackupSupported) {
+            CLog.i("android.software.backup feature is not supported on this device");
+            return;
+        }
+
         // Generate the files that are going to be backed up.
         checkDeviceTest(INCLUDE_EXCLUDE_TESTS_APP_NAME, INCLUDE_EXCLUDE_DEVICE_TEST_CLASS_NAME,
                 "createFiles");