• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (C) 2011 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
15package {
16    // See: http://go/android-license-faq
17    default_applicable_licenses: ["Android-Apache-2.0"],
18}
19
20android_test {
21    name: "CtsRenderscriptTestCases",
22    defaults: ["cts_defaults"],
23    // Include both the 32 and 64 bit versions
24    compile_multilib: "both",
25    static_libs: [
26        "compatibility-device-util-axt",
27        "ctstestrunner-axt",
28        "xmp_toolkit",
29    ],
30    libs: ["android.test.base.stubs"],
31    jni_libs: ["libcoremathtestcpp_jni"],
32    srcs: [
33        "src/**/*.java",
34        ":CtsRenderscriptTestCases-rscript{CtsRenderscriptTestCases.srcjar}",
35    ],
36    resource_zips: [
37        ":CtsRenderscriptTestCases-rscript{CtsRenderscriptTestCases.res.zip}",
38    ],
39    sdk_version: "current",
40    // Tag this module as a cts test artifact
41    test_suites: [
42        "cts",
43        "general-tests",
44    ],
45}
46
47genrule {
48    name: "CtsRenderscriptTestCases-rscript",
49    srcs: [
50        "src/**/*.rscript",
51        ":rs_script_api",
52        ":rs_clang_headers",
53    ],
54    tools: [
55        "llvm-rs-cc",
56        "soong_zip",
57    ],
58    out: [
59        "CtsRenderscriptTestCases.srcjar",
60        "CtsRenderscriptTestCases.res.zip",
61    ],
62    cmd: "for f in $(locations src/**/*.rscript); do " +
63        "  $(location llvm-rs-cc) -Wno-error=deprecated-declarations " +
64        "  -o $(genDir)/res/raw -p $(genDir)/src " +
65        "  -I $$(dirname $$(echo $(locations :rs_script_api) | awk '{ print $$1 }')) " +
66        "  -I $$(dirname $$(echo $(locations :rs_clang_headers) | awk '{ print $$1 }')) $${f}; " +
67        "done && " +
68        "$(location soong_zip) -srcjar -o $(location CtsRenderscriptTestCases.srcjar) -C $(genDir)/src -D $(genDir)/src &&" +
69        "$(location soong_zip) -o $(location CtsRenderscriptTestCases.res.zip) -C $(genDir)/res -D $(genDir)/res",
70}
71