Revert "Revert "Convert external/deqp/android/cts to Android.bp""
authorColin Cross <ccross@android.com>
Thu, 16 Aug 2018 18:16:01 +0000 (18:16 +0000)
committerColin Cross <ccross@android.com>
Thu, 16 Aug 2018 18:16:01 +0000 (18:16 +0000)
This reverts commit 10848da9348e610bd6e938836ae846abcf540a3d.

Bug: 112654980
Change-Id: I5c5d5b932eb7df0b710668dadaf788344ca5b1e2

Android.mk
android/cts/Android.bp [new file with mode: 0644]
android/cts/Android.mk [deleted file]
android/cts/runner/Android.mk [deleted file]
android/cts/runner/tests/Android.bp [new file with mode: 0644]
android/cts/runner/tests/Android.mk [deleted file]

index 67c1f4e..2afdfe9 100644 (file)
@@ -65,4 +65,4 @@ include $(BUILD_SHARED_LIBRARY)
 # Build the test APKs using their own makefiles
 # include $(call all-makefiles-under,$(LOCAL_PATH)/android)
 
-include $(LOCAL_PATH)/android/package/Android.mk $(LOCAL_PATH)/android/cts/Android.mk
+include $(LOCAL_PATH)/android/package/Android.mk
diff --git a/android/cts/Android.bp b/android/cts/Android.bp
new file mode 100644 (file)
index 0000000..9f68df4
--- /dev/null
@@ -0,0 +1,60 @@
+// Copyright (C) 2015 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.
+//
+
+filegroup {
+    name: "deqp_master_caselists",
+    srcs: [
+        "master/*.txt",
+    ],
+    path: "master",
+}
+
+genrule {
+    name: "deqp_nyc_caselists",
+    srcs: [
+        "nyc/vk-master.txt",
+        "nyc/gles31-master.txt",
+        "nyc/egl-master.txt",
+    ],
+    out: [
+        "nyc-vk-master.txt",
+        "nyc-gles31-master.txt",
+        "nyc-egl-master.txt",
+    ],
+    cmd: "for i in $(in); do cp $$i $(genDir)/nyc-$$(basename $$i); done",
+}
+
+java_test_host {
+    name: "CtsDeqpTestCases",
+
+    // Tag this module as a cts test artifact
+    test_suites: [
+        "cts",
+        "vts",
+        "general-tests",
+    ],
+
+    srcs: ["runner/src/**/*.java"],
+    libs: [
+        "cts-tradefed",
+        "compatibility-host-util",
+        "tradefed",
+    ],
+
+    data: [
+        ":deqp_master_caselists",
+        ":deqp_nyc_caselists",
+    ],
+}
diff --git a/android/cts/Android.mk b/android/cts/Android.mk
deleted file mode 100644 (file)
index 762eb2a..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright (C) 2015 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.
-#
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := CtsDeqpTestCases
-
-LOCAL_MODULE_TAGS := optional
-
-# Tag this module as a cts test artifact
-LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
-
-LOCAL_SDK_VERSION := 22
-
-LOCAL_SRC_FILES := $(call all-java-files-under, runner/src)
-LOCAL_JAVA_LIBRARIES := cts-tradefed compatibility-host-util tradefed
-
-DEQP_CASELISTS:=$(sort $(patsubst master/%,%, \
-  $(shell cd $(LOCAL_PATH) ; \
-          find -L master -maxdepth 1 -name "*.txt") \
-  ))
-LOCAL_COMPATIBILITY_SUPPORT_FILES := $(foreach file, $(DEQP_CASELISTS), $(LOCAL_PATH)/master/$(file):$(file))
-LOCAL_COMPATIBILITY_SUPPORT_FILES += $(LOCAL_PATH)/nyc/vk-master.txt:nyc-vk-master.txt
-LOCAL_COMPATIBILITY_SUPPORT_FILES += $(LOCAL_PATH)/nyc/gles31-master.txt:nyc-gles31-master.txt
-LOCAL_COMPATIBILITY_SUPPORT_FILES += $(LOCAL_PATH)/nyc/egl-master.txt:nyc-egl-master.txt
-
-include $(BUILD_HOST_JAVA_LIBRARY)
-
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/android/cts/runner/Android.mk b/android/cts/runner/Android.mk
deleted file mode 100644 (file)
index cb61b2a..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-# Copyright (C) 2015 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.
-#
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-# Build all sub-directories
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/android/cts/runner/tests/Android.bp b/android/cts/runner/tests/Android.bp
new file mode 100644 (file)
index 0000000..987cea8
--- /dev/null
@@ -0,0 +1,28 @@
+// Copyright (C) 2010 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.
+
+java_test_host {
+    name: "CtsDeqpRunnerTests",
+
+    // Only compile source java files in this lib.
+    srcs: ["src/**/*.java"],
+
+    libs: [
+        "cts-tradefed",
+        "compatibility-host-util",
+        "tradefed",
+        "CtsDeqpTestCases",
+    ],
+    static_libs: ["easymock"],
+}
diff --git a/android/cts/runner/tests/Android.mk b/android/cts/runner/tests/Android.mk
deleted file mode 100644 (file)
index 81ba834..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright (C) 2010 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.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-# Only compile source java files in this lib.
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_MODULE := CtsDeqpRunnerTests
-LOCAL_MODULE_TAGS := optional
-LOCAL_JAVA_LIBRARIES := cts-tradefed compatibility-host-util tradefed CtsDeqpTestCases
-LOCAL_STATIC_JAVA_LIBRARIES := easymock
-
-include $(BUILD_HOST_JAVA_LIBRARY)