mirror of https://github.com/llvm/circt.git
Disable llhd-sim tests when the executable is not built (#1425)
This commit is contained in:
parent
fe1bc77519
commit
65c72e5856
|
@ -272,6 +272,24 @@ else()
|
|||
endif()
|
||||
endif()
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# llhd-sim Configuration
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
if(NOT WIN32)
|
||||
option(CIRCT_LLHD_SIM_ENABLED "Enables LLHD sim." ON)
|
||||
else()
|
||||
option(CIRCT_LLHD_SIM_ENABLED "Enables LLHD sim." OFF)
|
||||
endif()
|
||||
|
||||
if(CIRCT_LLHD_SIM_ENABLED)
|
||||
message(STATUS "llhd-sim is enabled.")
|
||||
else()
|
||||
message(STATUS "llhd-sim is disabled.")
|
||||
endif()
|
||||
|
||||
llvm_canonicalize_cmake_booleans(CIRCT_LLHD_SIM_ENABLED)
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Python Configuration
|
||||
#-------------------------------------------------------------------------------
|
||||
|
|
|
@ -17,11 +17,14 @@ set(CIRCT_TEST_DEPENDS
|
|||
esi-tester
|
||||
handshake-runner
|
||||
firtool
|
||||
llhd-sim
|
||||
mlir-opt
|
||||
mlir-cpu-runner
|
||||
)
|
||||
|
||||
if(CIRCT_LLHD_SIM_ENABLED)
|
||||
list(APPEND CIRCT_TEST_DEPENDS llhd-sim)
|
||||
endif()
|
||||
|
||||
add_lit_testsuite(check-circt "Running the CIRCT regression tests"
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
DEPENDS ${CIRCT_TEST_DEPENDS}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// REQUIRES: llhd-sim
|
||||
// RUN: llhd-sim %s -shared-libs=%shlibdir/libcirct-llhd-signals-runtime-wrappers%shlibext | FileCheck %s
|
||||
|
||||
// CHECK: 0ps 0d 0e root/bool 0x01
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// REQUIRES: llhd-sim
|
||||
// RUN: llhd-sim %s -shared-libs=%shlibdir/libcirct-llhd-signals-runtime-wrappers%shlibext | FileCheck %s
|
||||
|
||||
// CHECK: 0ps 0d 0e root/sig[0] 0xffff
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// REQUIRES: llhd-sim
|
||||
// RUN: llhd-sim %s -shared-libs=%shlibdir/libcirct-llhd-signals-runtime-wrappers%shlibext | FileCheck %s
|
||||
|
||||
// CHECK: 0ps 0d 0e root/sameByte 0xffffffff
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// REQUIRES: llhd-sim
|
||||
// RUN: llhd-sim %s -T 5000 --trace-format=full -shared-libs=%shlibdir/libcirct-llhd-signals-runtime-wrappers%shlibext | FileCheck %s --check-prefix=FULL
|
||||
// RUN: llhd-sim %s -T 5000 --trace-format=reduced -shared-libs=%shlibdir/libcirct-llhd-signals-runtime-wrappers%shlibext | FileCheck %s --check-prefix=REDUCED
|
||||
// RUN: llhd-sim %s -T 5000 --trace-format=merged -shared-libs=%shlibdir/libcirct-llhd-signals-runtime-wrappers%shlibext | FileCheck %s --check-prefix=MERGED
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// REQUIRES: llhd-sim
|
||||
// RUN: llhd-sim %s -shared-libs=%shlibdir/libcirct-llhd-signals-runtime-wrappers%shlibext | FileCheck %s
|
||||
|
||||
// CHECK: 0ps 0d 0e root/proc/toggle 0x01
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// REQUIRES: llhd-sim
|
||||
// RUN: llhd-sim %s -n 10 -shared-libs=%shlibdir/libcirct-llhd-signals-runtime-wrappers%shlibext | FileCheck %s
|
||||
|
||||
// CHECK: 0ps 0d 0e root/clock 0x00
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// REQUIRES: llhd-sim
|
||||
// RUN: llhd-sim %s -shared-libs=%shlibdir/libcirct-llhd-signals-runtime-wrappers%shlibext | FileCheck %s
|
||||
|
||||
// CHECK: 0ps 0d 0e root/shl 0x01
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// REQUIRES: llhd-sim
|
||||
// RUN: llhd-sim %s -n 10 -r Foo -shared-libs=%shlibdir/libcirct-llhd-signals-runtime-wrappers%shlibext | FileCheck %s
|
||||
|
||||
// CHECK: 0ps 0d 0e Foo/toggle 0x00
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// REQUIRES: llhd-sim
|
||||
// RUN: llhd-sim %s -shared-libs=%shlibdir/libcirct-llhd-signals-runtime-wrappers%shlibext | FileCheck %s
|
||||
|
||||
// CHECK: 0ps 0d 0e root/proc/s1 0x00000000
|
||||
|
|
|
@ -57,7 +57,7 @@ tool_dirs = [
|
|||
]
|
||||
tools = [
|
||||
'firtool', 'handshake-runner', 'circt-opt', 'circt-translate',
|
||||
'circt-capi-ir-test', 'esi-tester', 'llhd-sim'
|
||||
'circt-capi-ir-test', 'esi-tester'
|
||||
]
|
||||
|
||||
# Enable Verilator if it has been detected.
|
||||
|
@ -70,4 +70,9 @@ if config.verilator_path != "":
|
|||
if config.esi_capnp != "":
|
||||
config.available_features.add('capnp')
|
||||
|
||||
# Add llhd-sim if it is built.
|
||||
if config.llhd_sim_enabled:
|
||||
config.available_features.add('llhd-sim')
|
||||
tools.append('llhd-sim')
|
||||
|
||||
llvm_config.add_tool_substitutions(tools, tool_dirs)
|
||||
|
|
|
@ -37,6 +37,7 @@ config.circt_tools_dir = "@CIRCT_TOOLS_DIR@"
|
|||
config.circt_shlib_dir = "@LLVM_LIBRARY_OUTPUT_INTDIR@"
|
||||
config.verilator_path = "@VERILATOR_PATH@"
|
||||
config.esi_capnp = "@ESI_CAPNP@"
|
||||
config.llhd_sim_enabled = @CIRCT_LLHD_SIM_ENABLED@
|
||||
|
||||
# Support substitution of the tools_dir with user parameters. This is
|
||||
# used when we can't determine the tool dir at configuration time.
|
||||
|
|
|
@ -10,7 +10,7 @@ set(LIBS
|
|||
)
|
||||
|
||||
# llhd-sim fails to link on Windows with MSVC.
|
||||
IF(NOT WIN32)
|
||||
IF(CIRCT_LLHD_SIM_ENABLED)
|
||||
add_llvm_executable(llhd-sim
|
||||
llhd-sim.cpp)
|
||||
|
||||
|
|
Loading…
Reference in New Issue