[CMake] Added remote test execution support into CrossWinToARMLinux CMake cache file.

Added two confguration argument to provide a host name and SSH user name
to run the tests on the remote target host.

* REMOTE_TEST_HOST  - remote host name or address.
* REMOTE_TEST_USER  - passwordless SSH account name.

Differential Revision: https://reviews.llvm.org/D71625
This commit is contained in:
Vladimir Vereschaka 2019-12-17 12:44:26 -08:00
parent 874a8004f9
commit eadc97b0ec
1 changed files with 29 additions and 1 deletions

View File

@ -14,6 +14,8 @@
# -DDEFAULT_SYSROOT=<path-to-develop-arm-linux-root-fs> ^
# -DLLVM_AR=<llvm_obj_root>/bin/llvm-ar[.exe] ^
# -DCMAKE_CXX_FLAGS="-D__OPTIMIZE__" ^
# -DREMOTE_TEST_HOST="<hostname>" ^
# -DREMOTE_TEST_USER="<ssh_user_name>" ^
# -C<llvm_src_root>/llvm-project/clang/cmake/caches/CrossWinToARMLinux.cmake ^
# <llvm_src_root>/llvm-project/llvm
# Build:
@ -82,7 +84,33 @@ set(LIBCXX_SYSROOT "${DEFAULT_SYSROOT}" CACHE STRING ""
set(BUILTINS_CMAKE_ARGS "-DCMAKE_SYSTEM_NAME=Linux;-DCMAKE_AR=${CMAKE_AR}" CACHE STRING "")
set(RUNTIMES_CMAKE_ARGS "-DCMAKE_SYSTEM_NAME=Linux;-DCMAKE_AR=${CMAKE_AR}" CACHE STRING "")
set(LLVM_INSTALL_TOOLCHAIN_ONLY ON CACHE BOOL "")
# Remote test configuration.
if(DEFINED REMOTE_TEST_HOST)
set(DEFAULT_TEST_EXECUTOR "SSHExecutor('${REMOTE_TEST_HOST}', '${REMOTE_TEST_USER}')")
set(DEFAULT_TEST_TARGET_INFO "libcxx.test.target_info.LinuxLocalTI")
# Allow override with the custom values.
if(NOT DEFINED LIBUNWIND_TARGET_INFO)
set(LIBUNWIND_TARGET_INFO "${DEFAULT_TEST_TARGET_INFO}" CACHE STRING "")
endif()
if(NOT DEFINED LIBUNWIND_EXECUTOR)
set(LIBUNWIND_EXECUTOR "${DEFAULT_TEST_EXECUTOR}" CACHE STRING "")
endif()
if(NOT DEFINED LIBCXXABI_TARGET_INFO)
set(LIBCXXABI_TARGET_INFO "${DEFAULT_TEST_TARGET_INFO}" CACHE STRING "")
endif()
if(NOT DEFINED LIBCXXABI_EXECUTOR)
set(LIBCXXABI_EXECUTOR "${DEFAULT_TEST_EXECUTOR}" CACHE STRING "")
endif()
if(NOT DEFINED LIBCXX_TARGET_INFO)
set(LIBCXX_TARGET_INFO "${DEFAULT_TEST_TARGET_INFO}" CACHE STRING "")
endif()
if(NOT DEFINED LIBCXX_EXECUTOR)
set(LIBCXX_EXECUTOR "${DEFAULT_TEST_EXECUTOR}" CACHE STRING "")
endif()
endif()
set(LLVM_INSTALL_TOOLCHAIN_ONLY ON CACHE BOOL "")
set(LLVM_TOOLCHAIN_TOOLS
llvm-ar
llvm-cov