[llvm] [BOLT] Create marker for source changes in nfc-mode testing. (PR #142931)
Paschalis Mpeis via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 23 06:52:53 PDT 2025
================
@@ -7,6 +7,29 @@
import sys
import textwrap
+def get_relevant_bolt_changes(dir: str) -> str:
+ # Return a list of bolt source changes that are relevant to testing.
+ all_changes = subprocess.run(
+ shlex.split("git show HEAD --name-only --pretty=''"),
+ cwd=dir,
+ text=True,
+ stdout=subprocess.PIPE,
+ )
+ keep_bolt = subprocess.run(
+ shlex.split("grep '^bolt'"),
+ input=all_changes.stdout,
+ text=True,
+ stdout=subprocess.PIPE,
+ )
+ keep_relevant = subprocess.run(
+ shlex.split(
+ "grep -v -e '^bolt/docs' -e '^bolt/utils/docker' -e '^bolt/utils/dot2html'"
----------------
paschalis-mpeis wrote:
My thinking was to include the helper python scripts, like `nfc-check-setup` itself, as a trigger for re-running the in-tree tests. That way, any breakage in the nfc-setup has a better chance being caught earlier in the buildbot.
We probably won't see frequent changes in the utils folder. Alternative options would be to include it as a whole, or ignore it entirely.
I lean towards the patch, though I'm not too happy with my grep's above.
No strong opinion either way. WDYT?
https://github.com/llvm/llvm-project/pull/142931
More information about the llvm-commits
mailing list