Skip to content

Commit 19c8c4a

Browse files
committed
t3302: drop unnecessary NOT_EXPENSIVE pseudo-prerequisite
This was only necessary because do_tests helper the script defines took its parameters in a wrong order. Just pass an empty string (or not passing the optional EXPENSIVE prerequisite) when running the test with a light-weight set of parameters and have the shell do the right thing when parsing test_expect_success helper. Signed-off-by: Junio C Hamano <[email protected]>
1 parent f23b1d0 commit 19c8c4a

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

t/t3302-notes-index-expensive.sh

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ test_description='Test commit notes index (expensive!)'
77

88
. ./test-lib.sh
99

10-
test_set_prereq NOT_EXPENSIVE
1110
test -n "$GIT_NOTES_TIMING_TESTS" && test_set_prereq EXPENSIVE
1211

1312
create_repo () {
@@ -103,8 +102,7 @@ time_notes () {
103102
}
104103

105104
do_tests () {
106-
pr=$1
107-
count=$2
105+
count=$1 pr=${2-}
108106

109107
test_expect_success $pr "setup $count" '
110108
mkdir "$count" &&
@@ -121,18 +119,18 @@ do_tests () {
121119
)
122120
'
123121

124-
test_expect_success USR_BIN_TIME,$pr 'notes timing with /usr/bin/time' '
122+
test_expect_success "USR_BIN_TIME${pr:+,$pr}" 'notes timing with /usr/bin/time' '
125123
(
126124
cd "$count" &&
127125
time_notes 100
128126
)
129127
'
130128
}
131129

132-
do_tests NOT_EXPENSIVE 10
130+
do_tests 10
133131
for count in 100 1000 10000
134132
do
135-
do_tests EXPENSIVE $count
133+
do_tests "$count" EXPENSIVE
136134
done
137135

138136
test_done

0 commit comments

Comments
 (0)