Skip to content

Commit b687cd6

Browse files
committed
t3419: 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. Also update coding style while we are at it. Signed-off-by: Junio C Hamano <[email protected]>
1 parent 19c8c4a commit b687cd6

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

t/t3419-rebase-patch-id.sh

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@ test_description='git rebase - test patch id computation'
44

55
. ./test-lib.sh
66

7-
test_set_prereq NOT_EXPENSIVE
87
test -n "$GIT_PATCHID_TIMING_TESTS" && test_set_prereq EXPENSIVE
98

10-
count()
11-
{
9+
count () {
1210
i=0
1311
while test $i -lt $1
1412
do
@@ -17,8 +15,7 @@ count()
1715
done
1816
}
1917

20-
scramble()
21-
{
18+
scramble () {
2219
i=0
2320
while read x
2421
do
@@ -27,12 +24,11 @@ scramble()
2724
echo "$x"
2825
fi
2926
i=$((($i+1) % 10))
30-
done < "$1" > "$1.new"
27+
done <"$1" >"$1.new"
3128
mv -f "$1.new" "$1"
3229
}
3330

34-
run()
35-
{
31+
run () {
3632
echo \$ "$@"
3733
/usr/bin/time "$@" >/dev/null
3834
}
@@ -42,10 +38,8 @@ test_expect_success 'setup' '
4238
git tag root
4339
'
4440

45-
do_tests()
46-
{
47-
pr=$1
48-
nlines=$2
41+
do_tests () {
42+
nlines=$1 pr=${2-}
4943

5044
test_expect_success $pr "setup: $nlines lines" "
5145
rm -f .gitattributes &&
@@ -102,7 +96,7 @@ do_tests()
10296
"
10397
}
10498

105-
do_tests NOT_EXPENSIVE 500
106-
do_tests EXPENSIVE 50000
99+
do_tests 500
100+
do_tests 50000 EXPENSIVE
107101

108102
test_done

0 commit comments

Comments
 (0)