ci: [refactor] Extract build_dir constant in ci-test-each-commit-exec.py
What changed, and why it matters
This is a tiny code cleanup in a CI (Continuous Integration) helper script. It replaces the hardcoded build directory name 'build' with a variable named 'build_dir' set to 'ci_build'. There is no security relevance; it is purely a refactor to make the script easier to maintain.
No security action needed. Treat as normal maintenance/refactor.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit modifies .github/ci-test-each-commit-exec.py to introduce a local constant ‘build_dir = “ci_build”’ and uses it in place of the literal string ‘build’ for cmake configuration, build, ctest, and functional test runner paths. The change is syntactic/maintainability only and does not alter program logic, permissions, inputs, or outputs in any security-relevant way.
Changed components
.github/ci-test-each-commit-exec.pyInspect captured patch +5 / −4
diff --git a/.github/ci-test-each-commit-exec.py b/.github/ci-test-each-commit-exec.py
index 67534ec6..b81241bc 100755
--- a/.github/ci-test-each-commit-exec.py
+++ b/.github/ci-test-each-commit-exec.py
@@ -21,11 +21,12 @@ def main():
run(["git", "log", "-1"])
num_procs = int(run(["nproc"], stdout=subprocess.PIPE).stdout)
+ build_dir = "ci_build"
run([
"cmake",
"-B",
- "build",
+ build_dir,
"-Werror=dev",
# Use clang++, because it is a bit faster and uses less memory than g++
"-DCMAKE_C_COMPILER=clang",
@@ -41,19 +42,19 @@ def main():
# Tolerate unused member functions in intermediate commits in a pull request
"-DCMAKE_CXX_FLAGS=-Wno-error=unused-member-function",
])
- run(["cmake", "--build", "build", "-j", str(num_procs)])
+ run(["cmake", "--build", build_dir, "-j", str(num_procs)])
run([
"ctest",
"--output-on-failure",
"--stop-on-failure",
"--test-dir",
- "build",
+ build_dir,
"-j",
str(num_procs),
])
run([
sys.executable,
- "./build/test/functional/test_runner.py",
+ f"./{build_dir}/test/functional/test_runner.py",
"-j",
str(num_procs * 2),
"--combinedlogslen=99999999",
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.