Meta/Make: allow --locale= and --test= to be given
It often is convenient to run only specific tests while still staying at the toplevel (some failures only reproduce with particular allocation patterns, for example). You can say $ Meta/Make --test='1013 91??' to run only test 1013 and 91xx series. Similarly, you can give --locale=en_US.UTF-8 or somesuch; earlier we always run tests in C locale for reproducibility, and the default stays the same, but sometimes it is useful to run tests in different locale.
Junio C Hamano committed
Apr 19, 2009 at 09:01 UTC
f355f2565bf7f2299494ae673d280a3a5a2c0476
1 file changed
+21
-10
Make
+21
-10
@@ -13,14 +13,9 @@ test -f "$GIT" || {
13
echo >&2 "No git to bootstrap"
14
}
15
PATH=/usr/bin:/bin
16
-LANG=C
17
-LC_ALL=C
18
-export PATH LANG LC_ALL
19
-
20
-# for now...
21
-#GIT_SVN_NO_LIB=1
22
-#export GIT_SVN_NO_LIB
16
+export PATH
17
18
+LANG=C
19
old_style_def_fix=b79d18c92d9f4841a6a1a29b7b2373a8ff9871e1
20
21
head=`$GIT symbolic-ref HEAD 2>/dev/null` &&
@@ -45,11 +40,11 @@ d="prefix=$prefix"
40
41
: ${O=-O2}
42
48
-Wall=-Wall
43
+Wall=-Wall tests=
44
while case $# in 0) break ;; esac
45
do
46
case "$1" in
52
- -pedantic)
47
+ -pedantic | --pedantic)
48
o= &&
49
rev=$($GIT rev-parse HEAD) &&
50
case "$($GIT merge-base "$old_style_def_fix" "$rev")" in
@@ -59,9 +54,21 @@ do
54
O="$O -Werror $o -std=c99 -Wno-pointer-to-int-cast"
55
# O="$O -fwrapv -fno-strict-overflow"
56
;;
62
- -loose)
57
+ -loose | --loose)
58
Wall=
59
;;
60
+ --locale=*)
61
+ LANG=${1#*=}
62
+ ;;
63
+ --test=*)
64
+ tests=$(
65
+ cd t &&
66
+ for t in ${1#*=}
67
+ do
68
+ eval echo "t$t-*.sh"
69
+ done | tr '\012' ' '
70
+ )
71
+ ;;
72
--)
73
shift
74
break
@@ -77,6 +84,9 @@ do
84
shift
85
done
86
87
+LC_ALL=$LANG
88
+export LANG LC_ALL
89
+
90
sh -c 'git describe --abbrev=4 HEAD' >/dev/null 2>&1 || {
91
$GIT describe --abbrev=4 HEAD | sed -e 's/-/./g' >version
92
}
@@ -90,6 +100,7 @@ make $d \
100
PYTHON_PATH=/usr/bin/python2.4 \
101
ETC_GITCONFIG=$prefix/etc/gitconfig \
102
CFLAGS="$CFLAGS" \
103
+ ${tests:+"T=$tests"} \
104
"$@"
105
status=$?
106
rm -f version