am 2b288246: am eafe610a: am f162ed19: Merge "Excluded irrelevant tests from clockwork devices." into lmp-sprout-dev

* commit '2b288246282294614c44ee91fd0b5bfff13858e0':
  Excluded irrelevant tests from clockwork devices.
diff --git a/CtsTestCaseList.mk b/CtsTestCaseList.mk
index 31dc2fd..721b9d4 100644
--- a/CtsTestCaseList.mk
+++ b/CtsTestCaseList.mk
@@ -107,6 +107,7 @@
     CtsAdminTestCases \
     CtsAnimationTestCases \
     CtsAppTestCases \
+    CtsAppWidgetTestCases \
     CtsBluetoothTestCases \
     CtsCalendarcommon2TestCases \
     CtsContentTestCases \
diff --git a/apps/CtsVerifier/proguard.flags b/apps/CtsVerifier/proguard.flags
index ca4680f..fe7eed8 100644
--- a/apps/CtsVerifier/proguard.flags
+++ b/apps/CtsVerifier/proguard.flags
@@ -19,3 +19,5 @@
 -dontwarn android.hardware.Sensor
 -dontwarn android.test.AndroidTestRunner
 -dontwarn java.util.concurrent.ConcurrentLinkedDeque
+-dontwarn android.cts.util.**
+-dontwarn junit.**
diff --git a/hostsidetests/security/Android.mk b/hostsidetests/security/Android.mk
index a42ee8a..50e0226 100644
--- a/hostsidetests/security/Android.mk
+++ b/hostsidetests/security/Android.mk
@@ -28,6 +28,7 @@
 LOCAL_CTS_TEST_PACKAGE := android.host.security
 
 LOCAL_JAVA_RESOURCE_FILES := $(HOST_OUT_EXECUTABLES)/sepolicy-analyze
+LOCAL_JAVA_RESOURCE_FILES += $(call intermediates-dir-for,ETC,general_sepolicy.conf)/general_sepolicy.conf
 
 include $(BUILD_CTS_HOST_JAVA_LIBRARY)
 
diff --git a/hostsidetests/security/src/android/cts/security/SELinuxHostTest.java b/hostsidetests/security/src/android/cts/security/SELinuxHostTest.java
index 36d060b..18d6a17 100644
--- a/hostsidetests/security/src/android/cts/security/SELinuxHostTest.java
+++ b/hostsidetests/security/src/android/cts/security/SELinuxHostTest.java
@@ -26,9 +26,10 @@
 
 import java.io.BufferedReader;
 import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
-import java.io.FileOutputStream;
 import java.lang.String;
 import java.net.URL;
 import java.util.Scanner;
@@ -42,15 +43,42 @@
  */
 public class SELinuxHostTest extends DeviceTestCase {
 
+    private File sepolicyAnalyze;
+    private File devicePolicyFile;
+
     /**
      * A reference to the device under test.
      */
     private ITestDevice mDevice;
 
+    private File copyResourceToTempFile(String resName) throws IOException {
+        InputStream is = this.getClass().getResourceAsStream(resName);
+        File tempFile = File.createTempFile("SELinuxHostTest", ".tmp");
+        FileOutputStream os = new FileOutputStream(tempFile);
+        int rByte = 0;
+        while ((rByte = is.read()) != -1) {
+            os.write(rByte);
+        }
+        os.flush();
+        os.close();
+        tempFile.deleteOnExit();
+        return tempFile;
+    }
+
     @Override
     protected void setUp() throws Exception {
         super.setUp();
         mDevice = getDevice();
+
+        /* retrieve the sepolicy-analyze executable from jar */
+        sepolicyAnalyze = copyResourceToTempFile("/sepolicy-analyze");
+        sepolicyAnalyze.setExecutable(true);
+
+        /* obtain sepolicy file from running device */
+        devicePolicyFile = File.createTempFile("sepolicy", ".tmp");
+        devicePolicyFile.deleteOnExit();
+        mDevice.executeAdbCommand("pull", "/sys/fs/selinux/policy",
+                devicePolicyFile.getAbsolutePath());
     }
 
     /**
@@ -60,25 +88,9 @@
      */
     public void testAllEnforcing() throws Exception {
 
-        /* retrieve the sepolicy-analyze executable from jar */
-        InputStream is = this.getClass().getResourceAsStream("/sepolicy-analyze");
-        File execFile = File.createTempFile("sepolicy-analyze", ".tmp");
-        FileOutputStream os = new FileOutputStream(execFile);
-        int rByte = 0;
-        while ((rByte = is.read()) != -1) {
-            os.write(rByte);
-        }
-        os.flush();
-        os.close();
-        execFile.setExecutable(true);
-
-        /* obtain sepolicy file from running device */
-        File policyFile = File.createTempFile("sepolicy", ".tmp");
-        mDevice.executeAdbCommand("pull", "/sys/fs/selinux/policy", policyFile.getAbsolutePath());
-
         /* run sepolicy-analyze permissive check on policy file */
-        ProcessBuilder pb = new ProcessBuilder(execFile.getAbsolutePath(), "-p", "-P",
-                policyFile.getAbsolutePath());
+        ProcessBuilder pb = new ProcessBuilder(sepolicyAnalyze.getAbsolutePath(), "-p", "-P",
+                devicePolicyFile.getAbsolutePath());
         pb.redirectOutput(ProcessBuilder.Redirect.PIPE);
         pb.redirectErrorStream(true);
         Process p = pb.start();
@@ -90,11 +102,35 @@
             errorString.append(line);
             errorString.append("\n");
         }
-
-        /* clean up and check condition */
-        execFile.delete();
-        policyFile.delete();
         assertTrue("The following SELinux domains were found to be in permissive mode:\n"
                    + errorString, errorString.length() == 0);
     }
+
+    /**
+     * Checks the policy running on-device against a set of neverallow rules
+     *
+     * @throws Exception
+     */
+    public void testNeverallowRules() throws Exception {
+
+        File neverallowRules = copyResourceToTempFile("/general_sepolicy.conf");
+
+        /* run sepolicy-analyze neverallow check on policy file using given neverallow rules */
+        ProcessBuilder pb = new ProcessBuilder(sepolicyAnalyze.getAbsolutePath(),
+                "-n", neverallowRules.getAbsolutePath(), "-P",
+                devicePolicyFile.getAbsolutePath());
+        pb.redirectOutput(ProcessBuilder.Redirect.PIPE);
+        pb.redirectErrorStream(true);
+        Process p = pb.start();
+        p.waitFor();
+        BufferedReader result = new BufferedReader(new InputStreamReader(p.getInputStream()));
+        String line;
+        StringBuilder errorString = new StringBuilder();
+        while ((line = result.readLine()) != null) {
+            errorString.append(line);
+            errorString.append("\n");
+        }
+        assertTrue("The following errors were encountered when validating the SELinux"
+                   + "neverallow rules:\n" + errorString, errorString.length() == 0);
+    }
 }
diff --git a/tests/expectations/knownfailures.txt b/tests/expectations/knownfailures.txt
index dd8660f..0318ab4 100644
--- a/tests/expectations/knownfailures.txt
+++ b/tests/expectations/knownfailures.txt
@@ -7,13 +7,6 @@
   bug: 17536113
 },
 {
-  description: "the ConnectivityConstraintTest are not yet stable",
-  names: [
-    "android.jobscheduler.cts.ConnectivityConstraintTest"
-  ],
-  bug: 18117279
-},
-{
   description: "tests a fragile by nature as they rely on hardcoded behavior",
   names: [
     "android.accessibilityservice.cts.AccessibilityTextTraversalTest#testActionNextAndPreviousAtGranularityPageOverText",
@@ -52,6 +45,26 @@
   bug: 16720689
 },
 {
+  description: "test can only run properly on a user build device when the bug is resolved",
+  names: [
+    "android.appwidget.cts.AppWidgetTest#testAppWidgetProviderCallbacks",
+    "android.appwidget.cts.AppWidgetTest#testBindAppWidget",
+    "android.appwidget.cts.AppWidgetTest#testCollectionWidgets",
+    "android.appwidget.cts.AppWidgetTest#testDeleteHost",
+    "android.appwidget.cts.AppWidgetTest#testDeleteHosts",
+    "android.appwidget.cts.AppWidgetTest#testGetAppWidgetIds",
+    "android.appwidget.cts.AppWidgetTest#testGetAppWidgetInfo",
+    "android.appwidget.cts.AppWidgetTest#testGetAppWidgetOptions",
+    "android.appwidget.cts.AppWidgetTest#testPartiallyUpdateAppWidgetViaWidgetId",
+    "android.appwidget.cts.AppWidgetTest#testPartiallyUpdateAppWidgetViaWidgetIds",
+    "android.appwidget.cts.AppWidgetTest#testTwoAppWidgetProviderCallbacks",
+    "android.appwidget.cts.AppWidgetTest#testUpdateAppWidgetViaComponentName",
+    "android.appwidget.cts.AppWidgetTest#testUpdateAppWidgetViaWidgetId",
+    "android.appwidget.cts.AppWidgetTest#testUpdateAppWidgetViaWidgetIds"
+  ],
+  bug: 17993121
+},
+{
   description: "A few WebGL tests are known to fail in WebView",
   names: [
     "android.webgl.cts.WebGLTest#test_conformance_extensions_oes_texture_float_with_video_html",
diff --git a/tests/tests/graphics/res/drawable/vector_icon_delete.xml b/tests/tests/graphics/res/drawable/vector_icon_delete.xml
index 8d9c21c..7b8f2aa 100644
--- a/tests/tests/graphics/res/drawable/vector_icon_delete.xml
+++ b/tests/tests/graphics/res/drawable/vector_icon_delete.xml
@@ -24,6 +24,6 @@
 
     <path
         android:fillColor="#FF000000"
-        android:pathData="M6.0,19.0c0.0,1.104 0.896,2.0 2.0,2.0l8.0,0.0c1.104,0.0 2.0-0.896 2.0-2.0l0.0-12.0L6.0,7.0L6.0,19.0zM18.0,4.0l-2.5,0.0l-1.0-1.0l-5.0,0.0l-1.0,1.0L6.0,4.0C5.4469986,4.0 5.0,4.4469986 5.0,5.0l0.0,1.0l14.0,0.0l0.0-1.0C19.0,4.4469986 18.552002,4.0 18.0,4.0z" />
+        android:pathData="M6.0,19.0c0.0,1.104 896e-3,2.0 2.0,2.0l8.0,0.0c1.104,0.0 2.0-896e-3 2.0-2.0l0.0-12.0L6.0,7.0L6.0,19.0zM18.0,4.0l-2.5,0.0l-1.0-1.0l-5.0,0.0l-1.0,1.0L6.0,4.0C5.4469986,4.0 5.0,4.4469986 5.0,5.0l0.0,1.0l14.0,0.0l0.0-1.0C19.0,4.4469986 18.552002,4.0 18.0,4.0z" />
 
 </vector>
\ No newline at end of file
diff --git a/tests/tests/graphics/res/drawable/vector_icon_heart.xml b/tests/tests/graphics/res/drawable/vector_icon_heart.xml
index ff55fe5..ad991c9 100644
--- a/tests/tests/graphics/res/drawable/vector_icon_heart.xml
+++ b/tests/tests/graphics/res/drawable/vector_icon_heart.xml
@@ -24,6 +24,6 @@
 
     <path
         android:fillColor="#FF000000"
-        android:pathData="M16.0,5.0c-1.955,0.0 -3.83,1.268 -4.5,3.0c-0.67-1.732 -2.547-3.0 -4.5-3.0C4.4570007,5.0 2.5,6.931999 2.5,9.5c0.0,3.529 3.793,6.258 9.0,11.5c5.207-5.242 9.0-7.971 9.0-11.5C20.5,6.931999 18.543,5.0 16.0,5.0z" />
+        android:pathData="M16.0,5.0c-1.955.0 -3.83,1.268 -4.5,3.0c-0.67-1.732 -2.547-3.0 -4.5-3.0C4.4570007,5.0 2.5,6.931999 2.5,9.5c0.0,3.529 3.793,6.258 9.0,11.5c5.207-5.242 9.0-7.971 9.0-11.5C20.5,6.931999 18.543,5.0 16.0,5.0z" />
 
 </vector>
\ No newline at end of file
diff --git a/tests/tests/graphics/src/android/graphics/cts/PaintTest.java b/tests/tests/graphics/src/android/graphics/cts/PaintTest.java
index 1f709d3..bac72b2 100644
--- a/tests/tests/graphics/src/android/graphics/cts/PaintTest.java
+++ b/tests/tests/graphics/src/android/graphics/cts/PaintTest.java
@@ -19,6 +19,7 @@
 
 import android.graphics.ColorFilter;
 import android.graphics.MaskFilter;
+import android.graphics.Matrix;
 import android.graphics.Paint;
 import android.graphics.Paint.Align;
 import android.graphics.Paint.Cap;
@@ -28,6 +29,8 @@
 import android.graphics.PathEffect;
 import android.graphics.Rasterizer;
 import android.graphics.Shader;
+import android.graphics.Bitmap;
+import android.graphics.BitmapShader;
 import android.graphics.Typeface;
 import android.graphics.Xfermode;
 import android.os.Build;
@@ -190,7 +193,7 @@
         assertEquals(m, p2.getMaskFilter());
         assertEquals(e, p2.getPathEffect());
         assertEquals(r, p2.getRasterizer());
-        assertNotSame(s, p2.getShader());
+        assertEquals(s, p2.getShader());
         assertEquals(t, p2.getTypeface());
         assertEquals(x, p2.getXfermode());
 
@@ -199,7 +202,7 @@
         assertEquals(m, p2.getMaskFilter());
         assertEquals(e, p2.getPathEffect());
         assertEquals(r, p2.getRasterizer());
-        assertNotSame(s, p2.getShader());
+        assertEquals(s, p2.getShader());
         assertEquals(t, p2.getTypeface());
         assertEquals(x, p2.getXfermode());
 
@@ -271,6 +274,35 @@
         assertNull(p.getShader());
     }
 
+    public void testShaderLocalMatrix() {
+        int width = 80;
+        int height = 120;
+        int[] color = new int[width * height];
+        Bitmap bitmap = Bitmap.createBitmap(color, width, height, Bitmap.Config.RGB_565);
+
+        Paint p = new Paint();
+        Matrix m = new Matrix();
+        Shader s = new BitmapShader(bitmap, Shader.TileMode.REPEAT, Shader.TileMode.REPEAT);
+
+        // set the shaders matrix to a non identity value and attach to paint
+        m.setScale(10, 0);
+        s.setLocalMatrix(m);
+        p.setShader(s);
+
+        Matrix m2 = new Matrix();
+        assertTrue(p.getShader().getLocalMatrix(m2));
+        assertEquals(m, m2);
+
+        // updated the matrix again and set it on the shader but NOT the paint
+        m.setScale(0, 10);
+        s.setLocalMatrix(m);
+
+        // assert that the matrix on the paint's shader also changed
+        Matrix m3 = new Matrix();
+        assertTrue(p.getShader().getLocalMatrix(m3));
+        assertEquals(m, m3);
+    }
+
     public void testSetAntiAlias() {
         Paint p = new Paint();
 
diff --git a/tests/tests/security/Android.mk b/tests/tests/security/Android.mk
index de58783..c41ee58 100644
--- a/tests/tests/security/Android.mk
+++ b/tests/tests/security/Android.mk
@@ -34,22 +34,6 @@
 
 LOCAL_SDK_VERSION := current
 
-intermediates.COMMON := $(call intermediates-dir-for,APPS,$(LOCAL_PACKAGE_NAME),,COMMON)
-
-sepolicy_asset_dir := $(intermediates.COMMON)/assets
-
-LOCAL_ASSET_DIR := $(sepolicy_asset_dir)
-
 include $(BUILD_CTS_PACKAGE)
 
-selinux_policy.xml := $(sepolicy_asset_dir)/selinux_policy.xml
-selinux_policy_parser := cts/tools/selinux/src/gen_SELinux_CTS.py
-general_sepolicy_policy.conf := $(call intermediates-dir-for,ETC,general_sepolicy.conf)/general_sepolicy.conf
-$(selinux_policy.xml): PRIVATE_POLICY_PARSER := $(selinux_policy_parser)
-$(selinux_policy.xml): $(general_sepolicy_policy.conf) $(selinux_policy_parser)
-	mkdir -p $(dir $@)
-	$(PRIVATE_POLICY_PARSER) $< $@ neverallow_only=t
-
-$(R_file_stamp): $(selinux_policy.xml)
-
 include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/tests/tests/security/src/android/security/cts/SELinuxPolicyRule.java b/tests/tests/security/src/android/security/cts/SELinuxPolicyRule.java
deleted file mode 100644
index d06fd75..0000000
--- a/tests/tests/security/src/android/security/cts/SELinuxPolicyRule.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * Copyright (C) 2014 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.security.cts;
-
-import android.util.Xml;
-
-import com.google.common.collect.HashMultimap;
-import com.google.common.collect.Multimap;
-import org.xmlpull.v1.XmlPullParser;
-import org.xmlpull.v1.XmlPullParserException;
-
-import java.io.InputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.HashMap;
-
-
-/**
- * A class for generating representations of SELinux avc rules parsed from an xml file.
- */
-public class SELinuxPolicyRule {
-    public final List<String> source_types;
-    public final List<String> target_types;
-    public final Multimap<String, String> obj_classes;
-    public final String name;
-    public final String type;
-
-    private SELinuxPolicyRule(List<String> source_types, List<String> target_types,
-            Multimap<String, String> obj_classes, String name, String type) {
-        this.source_types = source_types;
-        this.target_types = target_types;
-        this.obj_classes = obj_classes;
-        this.name = name;
-        this.type = type;
-    }
-
-    public static SELinuxPolicyRule readRule(XmlPullParser xpp) throws IOException, XmlPullParserException {
-        List<String> source_types = new ArrayList<String>();
-        List<String> target_types = new ArrayList<String>();
-        Multimap<String, String> obj_classes = HashMultimap.create();
-        xpp.require(XmlPullParser.START_TAG, null, "avc_rule");
-        String ruleName = xpp.getAttributeValue(null, "name");
-        String ruleType = xpp.getAttributeValue(null, "type");
-        while (xpp.next() != XmlPullParser.END_TAG) {
-            if (xpp.getEventType() != XmlPullParser.START_TAG) {
-                continue;
-            }
-            String name = xpp.getName();
-            if (name.equals("type")) {
-                if (xpp.getAttributeValue(null, "type").equals("source")) {
-                    source_types.add(readType(xpp));
-                } else if (xpp.getAttributeValue(null, "type").equals("target")) {
-                    target_types.add(readType(xpp));
-                } else {
-                    skip(xpp);
-                }
-            } else if (name.equals("obj_class")) {
-                String obj_name = xpp.getAttributeValue(null, "name");
-                List<String> perms = readObjClass(xpp);
-                obj_classes.putAll(obj_name, perms);
-            } else {
-                skip(xpp);
-            }
-        }
-        return new SELinuxPolicyRule(source_types, target_types, obj_classes, ruleName, ruleType);
-    }
-
-    public static List<SELinuxPolicyRule> readRulesFile(InputStream in) throws IOException, XmlPullParserException {
-        List<SELinuxPolicyRule> rules = new ArrayList<SELinuxPolicyRule>();
-        XmlPullParser xpp = Xml.newPullParser();
-        xpp.setInput(in, null);
-        xpp.nextTag();
-        xpp.require(XmlPullParser.START_TAG, null, "SELinux_AVC_Rules");
-
-        /* read rules */
-        while (xpp.next()  != XmlPullParser.END_TAG) {
-            if (xpp.getEventType() != XmlPullParser.START_TAG) {
-                continue;
-            }
-            String name = xpp.getName();
-            if (name.equals("avc_rule")) {
-                SELinuxPolicyRule r = readRule(xpp);
-                rules.add(r);
-            } else {
-                skip(xpp);
-            }
-        }
-        return rules;
-    }
-
-    private static List<String> readObjClass(XmlPullParser xpp) throws IOException, XmlPullParserException {
-        List<String> perms = new ArrayList<String>();
-        xpp.require(XmlPullParser.START_TAG, null, "obj_class");
-        while (xpp.next() != XmlPullParser.END_TAG) {
-        if (xpp.getEventType() != XmlPullParser.START_TAG) {
-                continue;
-            }
-            String name = xpp.getName();
-            if (name.equals("permission")) {
-                perms.add(readPermission(xpp));
-            } else {
-                skip(xpp);
-            }
-        }
-        return perms;
-    }
-
-    private static String readType(XmlPullParser xpp) throws IOException, XmlPullParserException {
-        xpp.require(XmlPullParser.START_TAG, null, "type");
-        String type = readText(xpp);
-        xpp.require(XmlPullParser.END_TAG, null, "type");
-        return type;
-    }
-
-    private static String readPermission(XmlPullParser xpp) throws IOException, XmlPullParserException {
-        xpp.require(XmlPullParser.START_TAG, null, "permission");
-        String permission = readText(xpp);
-        xpp.require(XmlPullParser.END_TAG, null, "permission");
-        return permission;
-    }
-
-    private static String readText(XmlPullParser xpp) throws IOException, XmlPullParserException {
-        String result = "";
-        if (xpp.next() == XmlPullParser.TEXT) {
-            result = xpp.getText();
-            xpp.nextTag();
-        }
-        return result;
-    }
-
-    public static void skip(XmlPullParser xpp) throws XmlPullParserException, IOException {
-        if (xpp.getEventType() != XmlPullParser.START_TAG) {
-            throw new IllegalStateException();
-        }
-        int depth = 1;
-        while (depth != 0) {
-            switch (xpp.next()) {
-            case XmlPullParser.END_TAG:
-                depth--;
-                break;
-            case XmlPullParser.START_TAG:
-                depth++;
-                break;
-            }
-        }
-    }
-}
diff --git a/tests/tests/security/src/android/security/cts/SELinuxTest.java b/tests/tests/security/src/android/security/cts/SELinuxTest.java
index 8e57037..711cb91 100644
--- a/tests/tests/security/src/android/security/cts/SELinuxTest.java
+++ b/tests/tests/security/src/android/security/cts/SELinuxTest.java
@@ -18,7 +18,6 @@
 
 import android.content.Context;
 import android.content.res.AssetManager;
-import android.security.cts.SELinuxPolicyRule;
 import android.test.AndroidTestCase;
 
 import junit.framework.TestCase;
@@ -82,130 +81,6 @@
         assertEquals(0, files.length);
     }
 
-    /**
-     * Verify all of the rules described by the selinux_policy.xml file are in effect.  Allow rules
-     * should return access granted, and Neverallow should return access denied.  All checks are run
-     * and then a list of specific failed checks is printed.
-     */
-    public void testSELinuxPolicyFile() throws IOException, XmlPullParserException {
-        List<String> failedChecks = new ArrayList<String>();
-        Map<String, Boolean> contextsCache = new HashMap<String, Boolean>();
-        int invalidContextsCount = 0;
-        int totalChecks = 0;
-        int totalFailedChecks = 0;
-        AssetManager assets = mContext.getAssets();
-        InputStream in = assets.open("selinux_policy.xml");
-        Collection<SELinuxPolicyRule> rules = SELinuxPolicyRule.readRulesFile(in);
-        for (SELinuxPolicyRule r : rules) {
-            PolicyFileTestResult result = runRuleChecks(r, contextsCache);
-            totalChecks += result.numTotalChecks;
-            if (result.numFailedChecks != 0) {
-                totalFailedChecks += result.numFailedChecks;
-
-                /* print failures to log, so as not to run OOM in the event of large policy mismatch,
-                   but record actual rule type and number */
-                failedChecks.add("SELinux avc rule " + r.type + r.name + " failed " + result.numFailedChecks +
-                        " out of " + result.numTotalChecks + " checks.");
-                for (String k : result.failedChecks) {
-                    System.out.println(r.type + r.name + " failed " + k);
-                }
-            }
-        }
-        if (totalFailedChecks != 0) {
-
-            /* print out failed rules, just the rule number and type */
-            for (String k : failedChecks) {
-                System.out.println(k);
-            }
-            System.out.println("Failed SELinux Policy Test: " + totalFailedChecks + " failed out of " + totalChecks);
-        }
-        for (String k : contextsCache.keySet()) {
-            if (!contextsCache.get(k)) {
-                invalidContextsCount++;
-                System.out.println("Invalid SELinux context encountered: " + k);
-            }
-        }
-        System.out.println("SELinuxPolicy Test Encountered: " + invalidContextsCount + " missing contexts out of " + contextsCache.size());
-        assertTrue(totalFailedChecks == 0);
-    }
-
-    /**
-     * A class for containing all of the results we care to know from checking each SELinux rule
-     */
-    private class PolicyFileTestResult {
-        private int numTotalChecks;
-        private int numFailedChecks;
-        private List<String> failedChecks = new ArrayList<String>();
-    }
-
-    private PolicyFileTestResult runRuleChecks(SELinuxPolicyRule r, Map<String, Boolean> contextsCache) {
-        PolicyFileTestResult result = new PolicyFileTestResult();
-
-        /* run checks by going through every possible 4-tuple specified by rule.  Start with class
-           and perm to allow early-exit based on context. */
-        for (String c : r.obj_classes.keySet()) {
-            for (String p : r.obj_classes.get(c)) {
-                for (String s : r.source_types) {
-
-                    /* check source context */
-                    String source_context = createAvcContext(s, false, c, p);
-                    if (!contextsCache.containsKey(source_context)) {
-                        contextsCache.put(source_context, checkSELinuxContext(source_context));
-                    }
-                    if (!contextsCache.get(source_context)) {
-                        continue;
-                    }
-                    for (String t : r.target_types) {
-                        if (t.equals("self")) {
-                            t = s;
-                        }
-
-                        /* check target context */
-                        String target_context = createAvcContext(t, true, c, p);
-                        if (!contextsCache.containsKey(target_context)) {
-                            contextsCache.put(target_context, checkSELinuxContext(target_context));
-                        }
-                        if (!contextsCache.get(target_context)) {
-                            continue;
-                        }
-                        boolean canAccess  = checkSELinuxAccess(source_context, target_context,
-                                c, p, "");
-                        result.numTotalChecks++;
-                        if ((r.type.equals("allow") && !canAccess)
-                                || (r.type.equals("neverallow") && canAccess)) {
-                            String failureNotice = s + ", " + t + ", " + c + ", " + p;
-                            result.numFailedChecks++;
-                            result.failedChecks.add(failureNotice);
-                        }
-                    }
-                }
-            }
-        }
-        return result;
-    }
-
-    /* createAvcContext - currently uses class type and perm to determine user, role and mls values.
-     *
-     * @param target - false if source domain, true if target.
-     */
-    private String createAvcContext(String domain, boolean target,
-            String obj_class, String perm) {
-        String usr = "u";
-        String role;
-
-        /* understand role labeling better */
-        if (obj_class.equals("filesystem") && perm.equals("associate")) {
-            role = "object_r";
-        } else if(obj_class.equals("process") || obj_class.endsWith("socket")) {
-            role = "r";
-        } else if (target) {
-            role = "object_r";
-        } else {
-            role = "r";
-        }
-        return String.format("%s:%s:%s:s0", usr, role, domain);
-    }
-
     private static native boolean checkSELinuxAccess(String scon, String tcon, String tclass, String perm, String extra);
 
     private static native boolean checkSELinuxContext(String con);
diff --git a/tests/tests/webkit/src/android/webkit/cts/CookieManagerTest.java b/tests/tests/webkit/src/android/webkit/cts/CookieManagerTest.java
index c612886..856b4aa 100644
--- a/tests/tests/webkit/src/android/webkit/cts/CookieManagerTest.java
+++ b/tests/tests/webkit/src/android/webkit/cts/CookieManagerTest.java
@@ -319,8 +319,6 @@
         assertFalse(anyDeleted.get());
     }
 
-    /*
-    TODO: uncomment when acceptThirdPartyCookies implementation lands
     public void testThirdPartyCookie() throws Throwable {
         if (!NullWebViewUtils.isWebViewAvailable()) {
             return;
@@ -377,7 +375,6 @@
             mOnUiThread.getSettings().setJavaScriptEnabled(false);
         }
     }
-    */
 
     public void testb3167208() throws Exception {
         if (!NullWebViewUtils.isWebViewAvailable()) {
diff --git a/tests/tests/webkit/src/android/webkit/cts/WebViewTest.java b/tests/tests/webkit/src/android/webkit/cts/WebViewTest.java
index ef64f4d..d9bae54 100755
--- a/tests/tests/webkit/src/android/webkit/cts/WebViewTest.java
+++ b/tests/tests/webkit/src/android/webkit/cts/WebViewTest.java
@@ -122,6 +122,11 @@
      */
     private static final long SCROLL_WAIT_INTERVAL_MS = 200;
 
+    /**
+     * Epsilon used in page scale value comparisons.
+     */
+    private static final float PAGE_SCALE_EPSILON = 0.0001f;
+
     private WebView mWebView;
     private CtsTestServer mWebServer;
     private WebViewOnUiThread mOnUiThread;
@@ -330,7 +335,7 @@
         // that a scale change does *not* happen.
         Thread.sleep(500);
         currScale = mOnUiThread.getScale();
-        assertEquals(currScale, previousScale);
+        assertEquals(currScale, previousScale, PAGE_SCALE_EPSILON);
 
         assertTrue(mOnUiThread.zoomOut());
         previousScale = currScale;
@@ -354,7 +359,7 @@
         // that a scale change does *not* happen.
         Thread.sleep(500);
         currScale = mOnUiThread.getScale();
-        assertEquals(currScale, previousScale);
+        assertEquals(currScale, previousScale, PAGE_SCALE_EPSILON);
 
         mOnUiThread.zoomBy(1.25f);
         previousScale = currScale;
@@ -378,7 +383,7 @@
         // that a scale change does *not* happen.
         Thread.sleep(500);
         currScale = mOnUiThread.getScale();
-        assertEquals(currScale, previousScale);
+        assertEquals(currScale, previousScale, PAGE_SCALE_EPSILON);
 
         mOnUiThread.zoomBy(0.8f);
         previousScale = currScale;
@@ -402,7 +407,7 @@
         // that a scale change does *not* happen.
         Thread.sleep(500);
         currScale = mOnUiThread.getScale();
-        assertEquals(currScale, previousScale);
+        assertEquals(currScale, previousScale, PAGE_SCALE_EPSILON);
     }
 
     @UiThreadTest
diff --git a/tools/utils/buildCts.py b/tools/utils/buildCts.py
index 4d04e1a..b2ab4d6 100755
--- a/tools/utils/buildCts.py
+++ b/tools/utils/buildCts.py
@@ -158,6 +158,7 @@
     # CTS Stable plan
     plan = tools.TestPlan(packages)
     plan.Exclude(r'com\.android\.cts\.browserbench')
+    plan.Exclude(r'com\.android\.cts\.filesystemperf\.RandomRWTest$')
     for package, test_list in flaky_tests.iteritems():
       plan.ExcludeTests(package, test_list)
     self.__WritePlan(plan, 'CTS-stable')
@@ -166,6 +167,7 @@
     plan = tools.TestPlan(packages)
     plan.Exclude('.*')
     plan.Include(r'com\.android\.cts\.browserbench')
+    plan.Include(r'com\.android\.cts\.filesystemperf\.RandomRWTest$')
     for package, test_list in flaky_tests.iteritems():
       plan.Include(package+'$')
       plan.IncludeTests(package, test_list)
@@ -173,7 +175,6 @@
 
     small_tests = BuildAospSmallSizeTestList()
     medium_tests = BuildAospMediumSizeTestList()
-    new_test_packages = BuildCtsVettedNewPackagesList()
 
     # CTS - sub plan for public, small size tests
     plan = tools.TestPlan(packages)
@@ -181,6 +182,7 @@
     for package, test_list in small_tests.iteritems():
       plan.Include(package+'$')
     plan.Exclude(r'com\.android\.cts\.browserbench')
+    plan.Exclude(r'com\.android\.cts\.filesystemperf\.RandomRWTest$')
     for package, test_list in flaky_tests.iteritems():
       plan.ExcludeTests(package, test_list)
     self.__WritePlan(plan, 'CTS-kitkat-small')
@@ -191,6 +193,7 @@
     for package, test_list in medium_tests.iteritems():
       plan.Include(package+'$')
     plan.Exclude(r'com\.android\.cts\.browserbench')
+    plan.Exclude(r'com\.android\.cts\.filesystemperf\.RandomRWTest$')
     for package, test_list in flaky_tests.iteritems():
       plan.ExcludeTests(package, test_list)
     self.__WritePlan(plan, 'CTS-kitkat-medium')
@@ -200,6 +203,7 @@
     plan.Exclude('.*')
     plan.Include(r'android\.hardware$')
     plan.Exclude(r'com\.android\.cts\.browserbench')
+    plan.Exclude(r'com\.android\.cts\.filesystemperf\.RandomRWTest$')
     for package, test_list in flaky_tests.iteritems():
       plan.ExcludeTests(package, test_list)
     self.__WritePlan(plan, 'CTS-hardware')
@@ -210,6 +214,7 @@
     plan.Include(r'android\.media$')
     plan.Include(r'android\.view$')
     plan.Exclude(r'com\.android\.cts\.browserbench')
+    plan.Exclude(r'com\.android\.cts\.filesystemperf\.RandomRWTest$')
     for package, test_list in flaky_tests.iteritems():
       plan.ExcludeTests(package, test_list)
     self.__WritePlan(plan, 'CTS-media')
@@ -219,48 +224,27 @@
     plan.Exclude('.*')
     plan.Include(r'android\.mediastress$')
     plan.Exclude(r'com\.android\.cts\.browserbench')
+    plan.Exclude(r'com\.android\.cts\.filesystemperf\.RandomRWTest$')
     for package, test_list in flaky_tests.iteritems():
       plan.ExcludeTests(package, test_list)
     self.__WritePlan(plan, 'CTS-mediastress')
 
-    # CTS - sub plan for new tests that is vetted for L launch
-    plan = tools.TestPlan(packages)
-    plan.Exclude('.*')
-    for package, test_list in new_test_packages.iteritems():
-      plan.Include(package+'$')
-    plan.Exclude(r'com\.android\.cts\.browserbench')
-    for package, test_list in flaky_tests.iteritems():
-      plan.ExcludeTests(package, test_list)
-    self.__WritePlan(plan, 'CTS-l-tests')
-
-    #CTS - sub plan for new test packages added for staging
+    # CTS - sub plan for new test packages added for staging
     plan = tools.TestPlan(packages)
     for package, test_list in small_tests.iteritems():
       plan.Exclude(package+'$')
     for package, test_list in medium_tests.iteritems():
       plan.Exclude(package+'$')
-    for package, tests_list in new_test_packages.iteritems():
-      plan.Exclude(package+'$')
     plan.Exclude(r'android\.hardware$')
     plan.Exclude(r'android\.media$')
     plan.Exclude(r'android\.view$')
     plan.Exclude(r'android\.mediastress$')
     plan.Exclude(r'com\.android\.cts\.browserbench')
+    plan.Exclude(r'com\.android\.cts\.filesystemperf\.RandomRWTest$')
     for package, test_list in flaky_tests.iteritems():
       plan.ExcludeTests(package, test_list)
     self.__WritePlan(plan, 'CTS-staging')
 
-    plan = tools.TestPlan(packages)
-    plan.Exclude('.*')
-    plan.Include(r'com\.drawelements\.')
-    self.__WritePlan(plan, 'CTS-DEQP')
-
-    plan = tools.TestPlan(packages)
-    plan.Exclude('.*')
-    plan.Include(r'android\.webgl')
-    self.__WritePlan(plan, 'CTS-webview')
-
-
 def BuildAospMediumSizeTestList():
   """ Construct a defaultdic that lists package names of medium tests
       already published to aosp. """
@@ -342,42 +326,9 @@
       'com.android.cts.videoperf' : [],
       'zzz.android.monkey' : []}
 
-def BuildCtsVettedNewPackagesList():
-  """ Construct a defaultdict that maps package names that is vetted for L. """
-  return {
-      'android.JobScheduler' : [],
-      'android.core.tests.libcore.package.harmony_annotation' : [],
-      'android.core.tests.libcore.package.harmony_beans' : [],
-      'android.core.tests.libcore.package.harmony_java_io' : [],
-      'android.core.tests.libcore.package.harmony_java_lang' : [],
-      'android.core.tests.libcore.package.harmony_java_math' : [],
-      'android.core.tests.libcore.package.harmony_java_net' : [],
-      'android.core.tests.libcore.package.harmony_java_nio' : [],
-      'android.core.tests.libcore.package.harmony_java_util' : [],
-      'android.core.tests.libcore.package.harmony_java_text' : [],
-      'android.core.tests.libcore.package.harmony_javax_security' : [],
-      'android.core.tests.libcore.package.harmony_logging' : [],
-      'android.core.tests.libcore.package.harmony_prefs' : [],
-      'android.core.tests.libcore.package.harmony_sql' : [],
-      'android.core.tests.libcore.package.jsr166' : [],
-      'android.core.tests.libcore.package.okhttp' : [],
-      'android.display' : [],
-      'android.host.theme' : [],
-      'android.jdwp' : [],
-      'android.location2' : [],
-      'android.print' : [],
-      'android.renderscriptlegacy' : [],
-      'android.signature' : [],
-      'android.tv' : [],
-      'android.uiautomation' : [],
-      'android.uirendering' : [],
-      'android.webgl' : [],
-      'com.drawelements.deqp.gles3' : [],
-      'com.drawelements.deqp.gles31' : []}
-
 def BuildCtsFlakyTestList():
   """ Construct a defaultdict that maps package name to a list of tests
-      that are known to be flaky in the lab or not passing on userdebug builds. """
+      that are known to be flaky. """
   return {
       'android.app' : [
           'cts.ActivityManagerTest#testIsRunningInTestHarness',],
@@ -412,11 +363,7 @@
           'cts.SELinuxDomainTest#testSuDomain',
           'cts.SELinuxHostTest#testAllEnforcing',],
       'android.webkit' : [
-          'cts.WebViewClientTest#testOnUnhandledKeyEvent',],
-      'com.android.cts.filesystemperf' : [
-          'RandomRWTest#testRandomRead',
-          'RandomRWTest#testRandomUpdate',],
-      '' : []}
+          'cts.WebViewClientTest#testOnUnhandledKeyEvent',]}
 
 def LogGenerateDescription(name):
   print 'Generating test description for package %s' % name