File tree Expand file tree Collapse file tree 3 files changed +20
-5
lines changed Expand file tree Collapse file tree 3 files changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -150,9 +150,14 @@ option(
150150 "During checkout, apply optional downstream patches to
151151 llvm-project to improve performance."
152152)
153+ option (
154+ ENABLE_QEMU_TESTING
155+ "Enable tests that use QEMU. This option is ON by default."
156+ ON
157+ )
153158option (
154159 ENABLE_FVP_TESTING
155- "Tests using FVP need to be explictly enabled ."
160+ "Enable tests that use FVPs. This option is OFF by default ."
156161)
157162set (
158163 FVP_INSTALL_DIR
@@ -596,6 +601,7 @@ if(NOT PREBUILT_TARGET_LIBRARIES)
596601 -DENABLE_VARIANTS=${ENABLE_VARIANTS_PASSTHROUGH}
597602 -DLIBC_HDRGEN=${LIBC_HDRGEN}
598603 -DFVP_INSTALL_DIR=${FVP_INSTALL_DIR}
604+ -DENABLE_QEMU_TESTING=${ENABLE_QEMU_TESTING}
599605 -DENABLE_FVP_TESTING=${ENABLE_FVP_TESTING}
600606 -DFVP_CONFIG_DIR=${CMAKE_CURRENT_SOURCE_DIR} /fvp/config
601607 -DFETCHCONTENT_SOURCE_DIR_LLVMPROJECT=${FETCHCONTENT_SOURCE_DIR_LLVMPROJECT}
Original file line number Diff line number Diff line change @@ -33,9 +33,14 @@ set(C_LIBRARY "picolibc" CACHE STRING "Which C library to use.")
3333set_property (CACHE C_LIBRARY PROPERTY STRINGS picolibc newlib llvmlibc)
3434set (LLVM_BINARY_DIR "" CACHE PATH "Path to LLVM toolchain build or install root." )
3535set (LIBC_HDRGEN "" CACHE PATH "Path to prebuilt lbc-hdrgen if not included in LLVM binaries set by LLVM_BINARY_DIR" )
36+ option (
37+ ENABLE_QEMU_TESTING
38+ "Enable tests that use QEMU. This option is ON by default."
39+ ON
40+ )
3641option (
3742 ENABLE_FVP_TESTING
38- "Tests using FVP need to be explictly enabled ."
43+ "Enable tests that use FVPs. This option is OFF by default ."
3944)
4045set (
4146 FVP_INSTALL_DIR
@@ -162,9 +167,9 @@ foreach(lib_idx RANGE ${lib_count_dec})
162167 file (READ ${variant_json_file} variant_json_str)
163168 string (JSON test_executor GET ${variant_json_str} "args" "common" "TEST_EXECUTOR" )
164169
165- # FVP testing should default to off, so override any
166- # settings from the JSON .
167- if (test_executor STREQUAL "fvp" AND NOT ${ENABLE_FVP_TESTING} )
170+ # The multilib project can be configured to disable QEMU and/or FVP
171+ # testing, which will need to override the settings from the json .
172+ if (( test_executor STREQUAL "qemu" AND NOT ${ENABLE_QEMU_TESTING} ) OR (test_executor STREQUAL " fvp" AND NOT ${ENABLE_FVP_TESTING} ) )
168173 list (APPEND additional_cmake_args "-DENABLE_LIBC_TESTS=OFF" "-DENABLE_COMPILER_RT_TESTS=OFF" "-DENABLE_LIBCXX_TESTS=OFF" )
169174 set (read_ENABLE_LIBC_TESTS "OFF" )
170175 set (read_ENABLE_COMPILER_RT_TESTS "OFF" )
Original file line number Diff line number Diff line change @@ -36,6 +36,10 @@ $ brew install llvm python3 git make ninja qemu cmake
3636$ pip install meson
3737```
3838
39+ Testing with QEMU is enabled by default, but can be disabled using the
40+ ` -DENABLE_QEMU_TESTING=OFF ` CMake option if testing is not required or QEMU is
41+ not installed.
42+
3943Some recent targets are not supported by QEMU, for these the Arm FVP models are
4044used instead. These models are available free-of-change but are not
4145open-source, and come with their own licenses.
You can’t perform that action at this time.
0 commit comments