-
Notifications
You must be signed in to change notification settings - Fork 14.9k
[analyzer] Use sed from the ToolBox on AIX (NFC) #161242
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
Conversation
@llvm/pr-subscribers-clang-static-analyzer-1 @llvm/pr-subscribers-clang Author: Kelvin Li (kkwli) ChangesThe change in 30402c7 breaks the tests on AIX. This patch is to change to use the cc @dbartol Full diff: https://github.com/llvm/llvm-project/pull/161242.diff 2 Files Affected:
diff --git a/clang/test/Analysis/diagnostics/Inputs/expected-sarif/sarif-multi-file-diagnostics.c.sarif b/clang/test/Analysis/diagnostics/Inputs/expected-sarif/sarif-multi-file-diagnostics.c.sarif
index 85e710fc7bac3..501d27ca22361 100644
--- a/clang/test/Analysis/diagnostics/Inputs/expected-sarif/sarif-multi-file-diagnostics.c.sarif
+++ b/clang/test/Analysis/diagnostics/Inputs/expected-sarif/sarif-multi-file-diagnostics.c.sarif
@@ -141,4 +141,4 @@
}
],
"version": "[SARIF version]"
-}
\ No newline at end of file
+}
diff --git a/clang/test/Analysis/lit.local.cfg b/clang/test/Analysis/lit.local.cfg
index 3d60a16405ea6..03ab418a5a4f7 100644
--- a/clang/test/Analysis/lit.local.cfg
+++ b/clang/test/Analysis/lit.local.cfg
@@ -17,11 +17,13 @@ config.substitutions.append(
)
)
+sed_cmd = "/opt/freeware/bin/sed" if "system-aix" in config.available_features else "sed"
+
# Filtering command for testing SARIF output against reference output.
config.substitutions.append(
(
"%normalize_sarif",
- "sed -r '%s;%s;%s;%s'"
+ f"{sed_cmd} -r '%s;%s;%s;%s'"
% (
# Replace version strings that are likely to change.
r's/"version": ".* version .*"/"version": "[clang version]"/',
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
The change in commit 30402c7 breaks the tests on AIX. This patch is to change to use the `sed` from AIX Toolbox instead of the default one which does not support `-r` and `-E`.
Thanks for finding and fixing this. |
The change in 30402c7 breaks the tests on AIX. This patch is to change to use the
sed
from AIX Toolbox instead of the default one which does not support-r
and-E
.cc @dbartol