[rocm-libraries] ROCm/rocm-libraries#4352 (commit 3c9beb3)

[CK] MICI: Fix git diff in selective_test_filter.py

## Motivation

- git diff needs access to reference repo

## Technical Details

- mount reference repo path into docker for selective_test_filter.py to
access

## Test Plan

- tested in MICI

## Test Result

- launch_tests.sh ran successfully
This commit is contained in:
Eiden Yoshida
2026-02-05 22:57:20 +00:00
committed by assistant-librarian[bot]
parent 58549aa787
commit e96beb1f3e
2 changed files with 13 additions and 4 deletions

View File

@@ -34,6 +34,13 @@ import os
def get_changed_files(ref1, ref2):
"""Return a set of files changed between two git refs."""
try:
result = subprocess.run(
["pwd"],
capture_output=True,
text=True,
check=True,
)
print("cwd:", result.stdout)
result = subprocess.run(
["git", "diff", "--name-only", ref1, ref2],
capture_output=True,
@@ -43,7 +50,9 @@ def get_changed_files(ref1, ref2):
files = set(line.strip() for line in result.stdout.splitlines() if line.strip())
return files
except subprocess.CalledProcessError as e:
print(f"Error running git diff: {e}")
print(f"Command '{e.cmd}' returned non-zero exit status {e.returncode}.")
print(f"Error output: {e.stderr}")
print(f"Standard output: {e.stdout}")
sys.exit(1)