Skip to content

Commit d552264

Browse files
tuliomnikic
authored andcommitted
Fix hello.mlir test on non-released LLVM
Ensure the test is executed only if the major version is 14. When using unreleased versions, more information may be appended to the version string, e.g. 21.0.0pre20250214.g1ff5f328d98246. This also prevents false-positives for the following versions: x.y.14 and 140.y.z.
1 parent 0439e8b commit d552264

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/hello.mlir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// REQUIRES: clang, mlir-translate, llvm-config
2-
// RUN: if `%llvm-config --version | grep -q 14`; then sed 's/func.func/func/' %s; else cat %s; fi | %mlir-translate --mlir-to-cpp > %t.c
2+
// RUN: if `%llvm-config --version | grep -qE '^14\.'`; then sed 's/func.func/func/' %s; else cat %s; fi | %mlir-translate --mlir-to-cpp > %t.c
33
// RUN: %clang %t.c -o %t
44
// RUN: %t
55

0 commit comments

Comments
 (0)