File tree Expand file tree Collapse file tree 3 files changed +23
-2
lines changed Expand file tree Collapse file tree 3 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ test_perf () {
163
163
else
164
164
echo " perf $test_count - $1 :"
165
165
fi
166
- for i in $( seq 1 $GIT_PERF_REPEAT_COUNT ) ; do
166
+ for i in $( test_seq 1 $GIT_PERF_REPEAT_COUNT ) ; do
167
167
say >&3 " running: $2 "
168
168
if test_run_perf_ " $2 "
169
169
then
Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ test -n "$GIT_TEST_LONG" && test_set_prereq EXPENSIVE
114
114
test_expect_success EXPENSIVE ' create 50,000 tags in the repo' '
115
115
(
116
116
cd "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
117
- for i in `seq 50000`
117
+ for i in `test_seq 50000`
118
118
do
119
119
echo "commit refs/heads/too-many-refs"
120
120
echo "mark :$i"
Original file line number Diff line number Diff line change @@ -530,6 +530,27 @@ test_cmp() {
530
530
$GIT_TEST_CMP " $@ "
531
531
}
532
532
533
+ # Print a sequence of numbers or letters in increasing order. This is
534
+ # similar to GNU seq(1), but the latter might not be available
535
+ # everywhere (and does not do letters). It may be used like:
536
+ #
537
+ # for i in `test_seq 100`; do
538
+ # for j in `test_seq 10 20`; do
539
+ # for k in `test_seq a z`; do
540
+ # echo $i-$j-$k
541
+ # done
542
+ # done
543
+ # done
544
+
545
+ test_seq () {
546
+ case $# in
547
+ 1) set 1 " $@ " ;;
548
+ 2) ;;
549
+ * ) error " bug in the test script: not 1 or 2 parameters to test_seq" ;;
550
+ esac
551
+ " $PERL_PATH " -le ' print for $ARGV[0]..$ARGV[1]' -- " $@ "
552
+ }
553
+
533
554
# This function can be used to schedule some commands to be run
534
555
# unconditionally at the end of the test to restore sanity:
535
556
#
You can’t perform that action at this time.
0 commit comments