Skip to content

Commit aac1a4f

Browse files
committed
*: add nocache rtree coverage debug run
1 parent 7dea15e commit aac1a4f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

build/jenkins_unit_test.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,18 @@ EXIT_STATUS=$?
2626
bazel_collect
2727
mkdir -p test_coverage
2828
mv bazel.xml test_coverage/bazel.xml
29+
30+
# Debug-only: re-run a single target with cache disabled to compare coverage.
31+
echo "=== nocache single-target coverage: //br/pkg/rtree:rtree_test ==="
32+
bazel --nohome_rc coverage --config=ci --repository_cache=/share/.cache/bazel-repository-cache \
33+
--instrument_test_targets --instrumentation_filter=//br/... \
34+
--@io_bazel_rules_go//go/config:cover_format=go_cover --define gotags=deadlock,intest \
35+
--nocache_test_results --noremote_accept_cached \
36+
-- //br/pkg/rtree:rtree_test || true
37+
output_path="$(bazel info output_path || true)"
38+
echo "nocache output_path: ${output_path}"
39+
for root in ${output_path}/k8-fastbuild*/testlogs; do
40+
grep -nH "github.com/pingcap/tidb/br/pkg/rtree/logging.go" \
41+
"$root/br/pkg/rtree/rtree_test/shard_*_of_8/coverage.dat" 2>/dev/null || true
42+
done
2943
exit ${EXIT_STATUS}

0 commit comments

Comments
 (0)