Skip to content

Commit ed4fb02

Browse files
committed
Replace long relative paths with more suitable Lit substitutions
1 parent f1dcd58 commit ed4fb02

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

mlir/test/lit.cfg.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949

5050
config.substitutions.append(("%PATH%", config.environment["PATH"]))
5151
config.substitutions.append(("%shlibext", config.llvm_shlib_ext))
52+
config.substitutions.append(("%llvm_src_root", config.llvm_src_root))
5253
config.substitutions.append(("%mlir_src_root", config.mlir_src_root))
5354
config.substitutions.append(("%host_cxx", config.host_cxx))
5455
config.substitutions.append(("%host_cc", config.host_cc))

mlir/test/lit.site.cfg.py.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import sys
44

55
config.target_triple = "@LLVM_TARGET_TRIPLE@"
6+
config.llvm_src_root = "@LLVM_SOURCE_DIR@"
67
config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@")
78
config.llvm_shlib_ext = "@SHLIBEXT@"
89
config.llvm_shlib_dir = lit_config.substitute(path(r"@SHLIBDIR@"))

mlir/test/mlir-tblgen/openmp-ops-verify.td

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
// Run tablegen to generate OmpCommon.td in temp directory first.
55
// RUN: mkdir -p %t/mlir/Dialect/OpenMP
66
// RUN: mlir-tblgen --gen-directive-decl --directives-dialect=OpenMP \
7-
// RUN: %S/../../../llvm/include/llvm/Frontend/OpenMP/OMP.td \
8-
// RUN: -I %S/../../../llvm/include > %t/mlir/Dialect/OpenMP/OmpCommon.td
7+
// RUN: %llvm_src_root/include/llvm/Frontend/OpenMP/OMP.td \
8+
// RUN: -I %llvm_src_root/include > %t/mlir/Dialect/OpenMP/OmpCommon.td
99

10-
// RUN: not mlir-tblgen -verify-openmp-ops -I %S/../../include -I %t %s 2>&1 | FileCheck %s
10+
// RUN: not mlir-tblgen -verify-openmp-ops -I %mlir_src_root/include -I %t %s 2>&1 | FileCheck %s
1111

1212
include "mlir/Dialect/OpenMP/OpenMPOpBase.td"
1313

mlir/test/mlir-tblgen/openmp-ops.td

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
// Run tablegen to generate OmpCommon.td in temp directory first.
77
// RUN: mkdir -p %t/mlir/Dialect/OpenMP
88
// RUN: mlir-tblgen --gen-directive-decl --directives-dialect=OpenMP \
9-
// RUN: %S/../../../llvm/include/llvm/Frontend/OpenMP/OMP.td \
10-
// RUN: -I %S/../../../llvm/include > %t/mlir/Dialect/OpenMP/OmpCommon.td
9+
// RUN: %llvm_src_root/include/llvm/Frontend/OpenMP/OMP.td \
10+
// RUN: -I %llvm_src_root/include > %t/mlir/Dialect/OpenMP/OmpCommon.td
1111

12-
// RUN: mlir-tblgen -gen-op-decls -I %S/../../include -I %t %s | FileCheck %s --check-prefix=DECL
13-
// RUN: mlir-tblgen -gen-op-doc -I %S/../../include -I %t %s | FileCheck %s --check-prefix=DOC
12+
// RUN: mlir-tblgen -gen-op-decls -I %mlir_src_root/include -I %t %s | FileCheck %s --check-prefix=DECL
13+
// RUN: mlir-tblgen -gen-op-doc -I %mlir_src_root/include -I %t %s | FileCheck %s --check-prefix=DOC
1414

1515
include "mlir/Dialect/OpenMP/OpenMPOpBase.td"
1616

0 commit comments

Comments
 (0)