blob: 770c5fb537ebc76727f08fd4ecfd4f4c89a50f93 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
#!/usr/bin/env bash
HERE=$(readlink --canonicalize $(dirname "$0"))
test_import () {
./admin/checkimports
}
test_tabs () {
/usr/bin/env bash "$HERE/notabs"
}
test_longlines () {
/usr/bin/env bash "$HERE/nolonglines"
}
test_nobadbraces () {
/usr/bin/env bash "$HERE/nobadbraces"
}
test_nobadcase () {
/usr/bin/env bash "$HERE/nobadcase"
}
test_opentag () {
/usr/bin/env bash "$HERE/open_tag"
}
test_docblocks () {
/usr/bin/env bash "$HERE/docblocks"
}
test_php () {
if uname -a | grep -i cygwin >/dev/null 2>/dev/null ; then
/usr/bin/env php "$(dirname "$0")/texttest.php" --insecure-rand
else
/usr/bin/env php "$HERE/texttest.php"
fi
}
tests="tabs longlines nobadbraces nobadcase opentag docblocks php import"
failures=
# Run in repository root (parent of this directory)
cd $(dirname "$HERE")
chmod +x ./admin/fixperms
./admin/fixperms
for test_name in $tests
do
echo "Running test $test_name" 1>&2
if ! eval "test_$test_name"
then
failures="$failures $test_name"
fi
done
if [ ! -z "$failures" ]
then
echo "Failures in: $failures" 1>&2
exit 1
fi
|