Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test failure if CLANG_VENDOR contains spaces #81017

Merged
merged 2 commits into from
Feb 7, 2024

Conversation

kongy
Copy link
Collaborator

@kongy kongy commented Feb 7, 2024

With CLANG_VENDOR set to anything with spaces in it, utils/update_cc_test_checks/generated-funcs.test test would break.

# .---command stdout------------
# | --- llvm-project/clang/test/utils/update_cc_test_checks/Inputs/generated-funcs.c.generated.all.expected
# | +++ build/tools/clang/test/utils/update_cc_test_checks/Output/generated-funcs.test.tmp-generated.c
# | @@ -246,12 +246,12 @@          
# |  //.                          
# |  // OMP: [[META0:![0-9]+]] = !{i32 1, !"wchar_size", i32 4}
# |  // OMP: [[META1:![0-9]+]] = !{i32 7, !"openmp", i32 51}                                                                                                                             
# | -// OMP: [[META2:![0-9]+]] = !{!"{{.*}}clang version {{.*}}"}
# | +// OMP: [[META2:![0-9]+]] = !{!"Android TEST clang version 19.0.0git (git@github.com:kongy/llvm-project.git 8c84096da195ae38336ba9aa700dc35e567157ba)"}
# |  // OMP: [[META3:![0-9]+]] = !{[[META4:![0-9]+]]}     
# |  // OMP: [[META4]] = !{i64 2, i64 -1, i64 -1, i1 true}        
# |  //.                                                                                    
# |  // NOOMP: [[META0:![0-9]+]] = !{i32 1, !"wchar_size", i32 4}
# | -// NOOMP: [[META1:![0-9]+]] = !{!"{{.*}}clang version {{.*}}"}
# | +// NOOMP: [[META1:![0-9]+]] = !{!"Android TEST clang version 19.0.0git (git@github.com:kongy/llvm-project.git 8c84096da195ae38336ba9aa700dc35e567157ba)"}
# |  // NOOMP: [[LOOP2]] = distinct !{[[LOOP2]], [[META3:![0-9]+]]}
# |  // NOOMP: [[META3]] = !{!"llvm.loop.mustprogress"}
# |  // NOOMP: [[LOOP4]] = distinct !{[[LOOP4]], [[META3]]}
# `-----------------------------

@llvmbot
Copy link
Collaborator

llvmbot commented Feb 7, 2024

@llvm/pr-subscribers-testing-tools

Author: Yi Kong (kongy)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/81017.diff

1 Files Affected:

  • (modified) llvm/utils/UpdateTestChecks/common.py (+1-1)
diff --git a/llvm/utils/UpdateTestChecks/common.py b/llvm/utils/UpdateTestChecks/common.py
index 0fe0dfc506b059..75c6e438556337 100644
--- a/llvm/utils/UpdateTestChecks/common.py
+++ b/llvm/utils/UpdateTestChecks/common.py
@@ -1701,7 +1701,7 @@ def add(var):
 
 METADATA_FILTERS = [
     (
-        r"(?<=\")(\w+ )?(\w+ version )[\d.]+(?:[^\" ]*)(?: \([^)]+\))?",
+        r"(?<=\")(.+ )?(\w+ version )[\d.]+(?:[^\" ]*)(?: \([^)]+\))?",
         r"{{.*}}\2{{.*}}",
     ),  # preface with glob also, to capture optional CLANG_VENDOR
     (r'(!DIFile\(filename: ".+", directory: )".+"', r"\1{{.*}}"),

@kongy kongy requested a review from nikic February 7, 2024 18:18
@hnrklssn
Copy link
Member

hnrklssn commented Feb 7, 2024

LGTM!

@kongy kongy merged commit d6c2cbb into llvm:main Feb 7, 2024
3 of 4 checks passed
@kongy kongy deleted the fix-clang-vendor-with-spaces branch February 7, 2024 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants