1// Copyright (C) 2024 The Android Open Source Project 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14// 15 16// Zip all the files in this directory together for merging into cts-verifier.zip. 17// build/envsetup.sh is used as a known file to get the location of the top of the 18// directory. 19package { 20 default_applicable_licenses: ["Android-Apache-2.0"], 21} 22 23java_genrule { 24 name: "multidevice-test-apps", 25 srcs: [ 26 ":NfcEmulatorTestApp", 27 ], 28 tools: ["soong_zip"], 29 out: ["multidevice-test-apps.zip"], 30 cmd: "echo $(location :NfcEmulatorTestApp) >$(genDir)/list && " + 31 "$(location soong_zip) -o $(out) -j -P android-cts-verifier/MultiDevice -l $(genDir)/list", 32} 33 34genrule { 35 name: "multidevice-test-list", 36 tools: [ 37 "soong_zip", 38 ":CtsNfcHceMultiDeviceTestCases-py-ctsv", 39 ], 40 out: ["multidevice-test-list.zip"], 41 cmd: "echo $(location :CtsNfcHceMultiDeviceTestCases-py-ctsv) >$(genDir)/test_list && " + 42 "$(location soong_zip) -o $(out) -P android-cts-verifier/MultiDevice/tests -l $(genDir)/test_list", 43} 44 45java_genrule { 46 name: "multidevice-test", 47 srcs: [ 48 "tools/*.py", 49 "utils/*.py", 50 "config.yml", 51 // Placeholder file outside the glob used to find the top of the directory. 52 "build/envsetup.sh", 53 ":multidevice-test-list", 54 ":multidevice-test-apps", 55 ], 56 tools: [ 57 "soong_zip", 58 "merge_zips", 59 ], 60 out: ["multidevice-test.zip"], 61 cmd: "echo $(locations tools/*.py) $(locations utils/*.py) $(locations build/envsetup.sh) $(locations config.yml) >$(genDir)/list && " + 62 "$(location soong_zip) -o $(genDir)/multidevice-temp.zip -P android-cts-verifier/MultiDevice -C $$(dirname $$(dirname $(location build/envsetup.sh))) -l $(genDir)/list && " + 63 "$(location merge_zips) $(out) $(genDir)/multidevice-temp.zip $(location :multidevice-test-list) $(location :multidevice-test-apps)", 64} 65