blob: d081af7aa04c105c4f09d02a2c6a3d7c54f3f4df (
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
|
#!/bin/bash
root=`pwd`
if [ -d "$root/tbuild/opt/bin" ]; then
PATH="$root/tbuild/opt/bin:$PATH"
fi
function fail {
cat test.log
echo -e "\e[0;31mFAILED! :(\e[0m"
exit 1
}
function runtest {
if type $1 &>/dev/null ; then
$1 $2/testall.py &> test.log || fail
else
echo "Warning: Skipping test for $1 (Not installed)"
fi
}
runtest python2.5 test
runtest python2.6 test
runtest python2.7 test
if type 2to3 &> /dev/null ; then
rm -rf test3k &> /dev/null
mkdir test3k
cp -a test/* test3k
cp bottle.py test3k
2to3 -w test3k/*.py &> 2to3.log || fail
runtest python3.0 test3k
runtest python3.1 test3k
runtest python3.2 test3k
rm -rf test3k
fi
echo -e "\e[0;32mPASSED :)\e[0m"
|