Home | History | Annotate | Download | only in vm-tests-tf
      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 
     15 java_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 
     24 java_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 
     37 java_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 
     48 java_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 
     58 java_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 
     70 java_genrule_host {
     71     name: "vmtests-dasm-dex-generated",
     72     tools: [
     73         "dasm",
     74         "soong_zip",
     75     ],
     76     tool_files: ["etc/vmtests-dasm.sh"],
     77     srcs: [ "src/dot/**/*.d" ],
     78     cmd: "$(location etc/vmtests-dasm.sh) $(location dasm) $(location soong_zip) $(genDir) $(out) $(in)",
     79     out: ["vmtests_dasm_dex_generated.jar"],
     80 }
     81 
     82 java_genrule {
     83     name: "vmtests_generated_mains_test_sources",
     84     tools: [
     85         "vmtests-buildutil",
     86         "soong_zip",
     87     ],
     88     cmd: "mkdir $(genDir)/src"
     89        + " && $(location vmtests-buildutil) util.build.BuildCTSMainsSources $(genDir)/src "
     90        + " && $(location soong_zip) -jar -o $(out) -C $(genDir)/src -D $(genDir)/src",
     91     out: ["vmtests.mains.generated.srcjar"],
     92 }
     93 
     94 java_library {
     95     name: "vmtests-mains",
     96     installable: true,
     97     libs: [ "cts-vmtests-dot" ],
     98     srcs: [":vmtests_generated_mains_test_sources"],
     99 }
    100 
    101 // TODO: Add vmtests-mains' dex jar to vmtests-generated-resources when
    102 //       it can be addressed.
    103 
    104 java_library_host {
    105     name: "vmtests-generated-resources",
    106     static_libs: [
    107         "host-cts-vmtests",
    108         "vmtests-dfh-dex-generated",
    109         "vmtests-dasm-dex-generated",
    110     ],
    111     installable: false,
    112 }
    113