Skip to content

Commit 46582ad

Browse files
committed
cross the filesystem mount
1 parent 186a3fe commit 46582ad

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/test_patch_git_preparation.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
"""
22
Test patch-git-prepare.sh script
33
"""
4+
5+
import os
46
import subprocess
57
import tempfile
68
from pathlib import Path
@@ -16,12 +18,13 @@ def test_patch_git_prep():
1618
# any directory is OK for our testing
1719
subprocess.run(["git", "config", "--global", "add.safe.directory", "*"],
1820
check=True)
21+
env = {**os.environ, "GIT_DISCOVERY_ACROSS_FILESYSTEM": "1"}
1922
with tempfile.TemporaryDirectory(dir=base_dir) as tmp_dir:
2023
tmp_path = Path(tmp_dir)
2124
commit = "c8d343a3ff7f6be17ff1d0dd7f89d06845c0a18b"
22-
subprocess.run([str(script_path), commit], cwd=tmp_path, check=True)
2325
r = subprocess.run([str(script_path), commit], cwd=tmp_path,
24-
capture_output=True, text=True, check=False)
26+
capture_output=True, text=True, check=False,
27+
env=env)
2528
if r.returncode:
2629
raise RuntimeError(f"Command errored: {r.stderr}")
2730
generated_file = tmp_path / "patch-git-generated-log.txt"

0 commit comments

Comments
 (0)