Debian Codegraph @

third-party/tbb/cmake/android/test_launcher.cmake

raw
1 # Copyright (c) 2020-2021 Intel Corporation
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 include(${CMAKE_CURRENT_LIST_DIR}/environment.cmake)
16
17 # transfer data to device
18 execute_on_device("mkdir -m 755 -p ${ANDROID_DEVICE_TESTING_DIRECTORY}")
19
20 file (GLOB_RECURSE BINARIES_LIST "${BINARIES_PATH}/*.so*" "${BINARIES_PATH}/${TEST_NAME}")
21 foreach(BINARY_FILE ${BINARIES_LIST})
22 transfer_data(${BINARY_FILE})
23 endforeach()
24
25 # execute binary
26 execute_on_device("chmod -R 755 ${ANDROID_DEVICE_TESTING_DIRECTORY}")
27 execute_on_device("LD_LIBRARY_PATH=${ANDROID_DEVICE_TESTING_DIRECTORY} ${ANDROID_DEVICE_TESTING_DIRECTORY}/${TEST_NAME}")