Skip to content

Commit 2753803

Browse files
committed
runtests: misc fixes
avoid bare path params in pytest invocation as they can mislead pytest in its search for the config.rootpath see pytest-dev/pytest#1435 using `--flag=<path>` instead of `--flag <path>` solves the issue. switch from treeless clone to blobless clone to keep clones reasonably fast, while avoiding the dramatic slowdown cuased by repeated remote fetches during impact analysis walking of older commits
1 parent b2fe7ab commit 2753803

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

runtests.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ for repo in "${repos[@]}" ; do
4444

4545
# quick repo clone
4646
rm -rf "$d"
47-
git clone --filter=tree:0 --single-branch "${clone_args[@]}" "$d"
47+
# NB: tree-less clone works fine for validation but gets extremely slow
48+
# for impact analysis... stick to blob-less
49+
# --filter=tree:0
50+
git clone --filter=blob:none --single-branch "${clone_args[@]}" "$d"
4851

4952
cd "$d"
5053

@@ -90,12 +93,12 @@ for repo in "${repos[@]}" ; do
9093

9194
prune_args=()
9295
if [ -f "../hook.py" ] ; then
93-
prune_args+=(--prune-hook ../hook.py)
96+
prune_args+=(--prune-hook=../hook.py)
9497
fi
9598

9699
if [[ "${VALIDATE:-1}" == "1" ]] ; then
97100
# save graph in pre-test validation for use at test-time
98-
prune_args+=(--prune-graph graph.bin)
101+
prune_args+=(--prune-graph=graph.bin)
99102

100103
echo "pre-test validation"
101104
"${runpy[@]}" prunepytest.validator "${prune_args[@]}"
@@ -115,8 +118,8 @@ for repo in "${repos[@]}" ; do
115118
fi
116119

117120
echo "impact check"
118-
impact_depth=${IMPACT_DEPTH:-20}
119-
pytest_args=(--prune --prune-impact --prune-impact-depth "${impact_depth}" ${prune_args:+"${prune_args[@]}"})
121+
impact_depth=${IMPACT_DEPTH:-50}
122+
pytest_args=(--prune ${prune_args:+"${prune_args[@]}"} --prune-impact --prune-impact-depth="${impact_depth}")
120123
export PYTEST_ADDOPTS="${pytest_args[@]}"
121124
if [ -x ../runtests.sh ] ; then
122125
../runtests.sh

0 commit comments

Comments
 (0)