mirror of https://github.com/llvm/circt.git
[CI][lit] Enable roundtrip tests in CI (#7377)
This PR adds a round trip tests In CI. This could slightly increase the test time but it's
ignorable compared to build time.
cf. a6d09d4b1a
Close https://github.com/llvm/circt/issues/5272
This commit is contained in:
parent
7b8b339548
commit
e8033f1928
|
@ -222,7 +222,7 @@ jobs:
|
|||
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
|
||||
-DLLVM_LIT_ARGS="-v" \
|
||||
-DCIRCT_SLANG_FRONTEND_ENABLED=ON
|
||||
ninja check-circt check-circt-unit -j$(nproc)
|
||||
CIRCT_OPT_CHECK_IR_ROUNDTRIP=1 ninja check-circt check-circt-unit -j$(nproc)
|
||||
ninja circt-doc
|
||||
|
||||
# --------
|
||||
|
|
|
@ -51,6 +51,8 @@ config.test_exec_root = os.path.join(config.circt_obj_root, 'test')
|
|||
|
||||
# Tweak the PATH to include the tools dir.
|
||||
llvm_config.with_environment('PATH', config.llvm_tools_dir, append_path=True)
|
||||
llvm_config.with_environment('PATH', config.mlir_tools_dir, append_path=True)
|
||||
llvm_config.with_environment('PATH', config.circt_tools_dir, append_path=True)
|
||||
|
||||
tool_dirs = [
|
||||
config.circt_tools_dir, config.mlir_tools_dir, config.llvm_tools_dir
|
||||
|
@ -58,10 +60,18 @@ tool_dirs = [
|
|||
tools = [
|
||||
'arcilator', 'circt-as', 'circt-capi-ir-test', 'circt-capi-om-test',
|
||||
'circt-capi-firrtl-test', 'circt-capi-firtool-test', 'circt-dis',
|
||||
'circt-opt', 'circt-reduce', 'circt-translate', 'firtool', 'hlstool',
|
||||
'om-linker', 'ibistool'
|
||||
'circt-reduce', 'circt-translate', 'firtool', 'hlstool', 'om-linker',
|
||||
'ibistool'
|
||||
]
|
||||
|
||||
if "CIRCT_OPT_CHECK_IR_ROUNDTRIP" in os.environ:
|
||||
tools.extend([
|
||||
ToolSubst("circt-opt", "circt-opt --verify-roundtrip",
|
||||
unresolved="fatal"),
|
||||
])
|
||||
else:
|
||||
tools.extend(["circt-opt"])
|
||||
|
||||
# Enable Verilator if it has been detected.
|
||||
if config.verilator_path != "":
|
||||
tool_dirs.append(os.path.dirname(config.verilator_path))
|
||||
|
|
Loading…
Reference in New Issue