1// Copyright (C) 2018 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 15java_library { 16 name: "cts-vmtests-dot", 17 libs: [ "junit" ], 18 srcs: [ "src/dot/**/*.java" ], 19 installable: false, 20 include_srcs: true, 21 host_supported: true, 22} 23 24java_binary_host { 25 name: "vmtests-buildutil", 26 static_libs: [ "cts-vmtests-dot", "junit" ], 27 srcs: [ 28 "build/src/util/build/BuildCTSHostSources.java", 29 "build/src/util/build/BuildCTSMainsSources.java", 30 "build/src/util/build/BuildUtilBase.java", 31 "build/src/util/build/FileUtil.java", 32 "build/src/util/build/JUnitTestCollector.java", 33 ], 34 wrapper: "etc/vmtests-buildutil.sh", 35} 36 37java_genrule_host { 38 name: "vmtests_generated_host_test_sources", 39 tools: [ 40 "vmtests-buildutil", 41 "soong_zip", 42 ], 43 cmd: "$(location vmtests-buildutil) util.build.BuildCTSHostSources $(genDir) " + 44 " && $(location soong_zip) -jar -o $(out) -C $(genDir) -D $(genDir)/dot", 45 out: ["vmtests.host.generated.srcjar"], 46} 47 48java_library_host { 49 name: "host-cts-vmtests", 50 libs: [ 51 "junit", 52 "tradefed", 53 ], 54 srcs : [ ":vmtests_generated_host_test_sources" ], 55 installable: false, 56} 57 58java_genrule_host { 59 name: "vmtests-dfh-dex-generated", 60 tools: [ 61 "cfassembler", 62 "soong_zip", 63 ], 64 tool_files: ["etc/vmtests-cfassembler.sh"], 65 srcs: ["src/dot/**/*.dfh"], 66 cmd: "$(location etc/vmtests-cfassembler.sh) $(location cfassembler) $(location soong_zip) $(genDir) $(out) $(in)", 67 out: ["vmtests_dfh_dex_generated.jar"], 68} 69 70java_genrule { 71 name: "vmtests_generated_mains_test_sources", 72 tools: [ 73 "vmtests-buildutil", 74 "soong_zip", 75 ], 76 cmd: "mkdir $(genDir)/src" 77 + " && $(location vmtests-buildutil) util.build.BuildCTSMainsSources $(genDir)/src " 78 + " && $(location soong_zip) -jar -o $(out) -C $(genDir)/src -D $(genDir)/src", 79 out: ["vmtests.mains.generated.srcjar"], 80} 81 82java_library { 83 name: "vmtests-mains", 84 installable: true, 85 libs: [ "cts-vmtests-dot" ], 86 srcs: [":vmtests_generated_mains_test_sources"], 87} 88 89// TODO: Add vmtests-mains' dex jar to vmtests-generated-resources when 90// it can be addressed. 91 92java_library_host { 93 name: "vmtests-generated-resources", 94 static_libs: [ 95 "host-cts-vmtests", 96 "vmtests-dfh-dex-generated", 97 ], 98 installable: false, 99} 100