From 41fd4079639f2f2eb73b41e83795d510f6b68654 Mon Sep 17 00:00:00 2001 From: Eiden Yoshida <47196116+eidenyoshida@users.noreply.github.com> Date: Thu, 5 Feb 2026 17:56:12 -0500 Subject: [PATCH] [CK] MICI: Fix git diff in selective_test_filter.py (#4352) ## 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 --- Jenkinsfile | 6 +++--- script/dependency-parser/src/selective_test_filter.py | 11 ++++++++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2a6b8df1bd..a5a2c6ca35 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -484,7 +484,7 @@ def get_docker_options(){ // on some machines the group ids for video and render groups may not be the same as in the docker image! def video_id = sh(returnStdout: true, script: 'getent group video | cut -d: -f3') def render_id = sh(returnStdout: true, script: 'getent group render | cut -d: -f3') - dockerOpts = dockerOpts + " --group-add=${video_id} --group-add=${render_id} " + dockerOpts = dockerOpts + " --group-add=${video_id} --group-add=${render_id} -v /var/jenkins/ref-repo/:/var/jenkins/ref-repo/ " echo "Docker flags: ${dockerOpts}" return dockerOpts } @@ -1294,8 +1294,8 @@ pipeline { description: "Run CK_BUILDER tests (default: ON)") booleanParam( name: "RUN_ALL_UNIT_TESTS", - defaultValue: true, - description: "Run all unit tests (default: ON)") + defaultValue: false, + description: "Run all unit tests (default: OFF)") booleanParam( name: "RUN_PYTORCH_TESTS", defaultValue: false, diff --git a/script/dependency-parser/src/selective_test_filter.py b/script/dependency-parser/src/selective_test_filter.py index 83f7f7eebe..782fac5606 100644 --- a/script/dependency-parser/src/selective_test_filter.py +++ b/script/dependency-parser/src/selective_test_filter.py @@ -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)