blob: c2334fc3b4c5fc31f99db06b54899129c5e97d06 [file] [log] [blame]
// Copyright (C) 2015 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Reusable Camera performance test classes and helpers
package {
default_applicable_licenses: ["Android-Apache-2.0"],
}
android_library {
name: "cts-camera-performance-tests",
static_libs: [
"compatibility-device-util-axt",
"ctstestrunner-axt",
"mockito-target-minus-junit4",
"CtsCameraUtils",
"truth-prebuilt",
"androidx.test.rules",
],
manifest: "AndroidManifest-lib.xml",
resource_dirs: ["res"],
srcs: [
"src/android/hardware/camera2/cts/testcases/Camera2AndroidTestRule.java",
"src/android/hardware/camera2/cts/Camera2SurfaceViewCtsActivity.java",
"src/android/hardware/camera2/cts/testcases/Camera2SurfaceViewTestCase.java",
"src/android/hardware/camera2/cts/PerformanceTest.java",
"src/android/hardware/cts/CameraPerformanceTestHelper.java",
"src/android/hardware/cts/LegacyCameraPerformanceTest.java",
"src/android/hardware/camera2/cts/RecordingTest.java",
],
sdk_version: "test_current",
libs: [
"android.test.runner.stubs",
"android.test.base.stubs",
],
}
// CtsCameraTestCases package
android_test {
name: "CtsCameraTestCases",
defaults: ["cts_defaults"],
// Include both the 32 and 64 bit versions
compile_multilib: "both",
static_libs: [
"compatibility-device-util-axt",
"ctstestrunner-axt",
"cts-hardware-lib",
"mockito-target-minus-junit4",
"android-ex-camera2",
"CtsCameraUtils",
"truth-prebuilt",
"androidx.heifwriter_heifwriter",
"androidx.test.rules",
"MediaPerformanceClassCommon",
],
jni_libs: [
"libctscamera2_jni",
"libnativehelper_compat_libc++",
],
stl: "c++_shared",
srcs: [
"src/**/*.java",
":CtsCameraTestCases-rscript{CtsCameraTestCases.srcjar}",
],
resource_zips: [
":CtsCameraTestCases-rscript{CtsCameraTestCases.res.zip}",
],
test_suites: [
"cts",
"general-tests",
],
sdk_version: "test_current",
libs: [
"android.test.runner.stubs",
"android.test.base.stubs",
],
per_testcase_directory: true,
}
genrule {
name: "CtsCameraTestCases-rscript",
srcs: [
"src/**/*.rscript",
":rs_script_api",
":rs_clang_headers",
],
tools: [
"llvm-rs-cc",
"soong_zip",
],
out: [
"CtsCameraTestCases.srcjar",
"CtsCameraTestCases.res.zip",
],
cmd: "for f in $(locations src/**/*.rscript); do " +
" $(location llvm-rs-cc) -o $(genDir)/res/raw -p $(genDir)/src " +
" -I $$(dirname $$(echo $(locations :rs_script_api) | awk '{ print $$1 }')) " +
" -I $$(dirname $$(echo $(locations :rs_clang_headers) | awk '{ print $$1 }')) $${f}; " +
"done && " +
"$(location soong_zip) -srcjar -o $(location CtsCameraTestCases.srcjar) -C $(genDir)/src -D $(genDir)/src &&" +
"$(location soong_zip) -o $(location CtsCameraTestCases.res.zip) -C $(genDir)/res -D $(genDir)/res",
}