1# Copyright {year}, 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# WARNING: This BUILD file was generated by a tool. 16# It should not be manually modified. 17 18# SOONG_TARGET:HelloWorldHostTest 19 20package(default_visibility=["//visibility:public"]) 21 22load("//build/bazel/rules:java_test.bzl", "java_test") 23 24_LIB_SRCS = glob([ 25 "{prebuilts_dir_name}/host/lib/**/*", 26 "{prebuilts_dir_name}/host/lib64/**/*" 27]) 28_TESTCASE_HOST_SRCS = glob(["{prebuilts_dir_name}/host_testcases/HelloWorldHostTest/**/*"]) 29 30_LIB_OUTS = [f.replace("{prebuilts_dir_name}/host/", "") for f in _LIB_SRCS] 31_TESTCASE_HOST_OUTS = [ 32 f.replace("{prebuilts_dir_name}/host_testcases/HelloWorldHostTest/", "host/") 33 for f in _TESTCASE_HOST_SRCS 34] 35 36genrule(name="HelloWorldHostTest_prebuilt", 37 srcs=_LIB_SRCS + _TESTCASE_HOST_SRCS, 38 outs=_LIB_OUTS + _TESTCASE_HOST_OUTS, 39 cmd=""" 40 src_files=($(SRCS)) 41 out_files=($(OUTS)) 42 for i in "$${{!src_files[@]}}" 43 do 44 src_file=$${{src_files[$$i]}} 45 out_file=$${{out_files[$$i]}} 46 mkdir -p $$(dirname $$src_file) 47 cp $$src_file $$out_file 48 done 49 """) 50 51java_test(name="HelloWorldHostTest", deps=[":HelloWorldHostTest_prebuilt"])