debuggers.hg

view tools/tests/run_tests.sh @ 21067:b4a1832a916f

Update Xen version to 4.0.0-rc6
author Keir Fraser <keir.fraser@citrix.com>
date Tue Mar 09 18:18:05 2010 +0000 (2010-03-09)
parents 4fc6ff1e1141
children
line source
1 #!/bin/bash
2 #
3 # This runs the available unit-tests with all different supported
4 # python versions.
5 #
6 # To run this this must be 'cd'ed to the tests directory.
7 #
9 ENABLE_UNSUPPORTED=0
11 function usage()
12 {
13 printf "Usage: %s: [-u]\n" $0
14 printf " -u: run test with unsupported python versions also\n"
15 }
17 function run_one_test()
18 {
19 PYTHON=$1
20 PYTHON_EXECUTABLE=`echo $PYTHON | tr -d "-"`
21 echo "+++ Running tests with $PYTHON"
22 export LD_LIBRARY_PATH=./regression/installed/$PYTHON/lib
23 ./regression/installed/$PYTHON/bin/$PYTHON_EXECUTABLE \
24 utests/run_all_tests.py
25 echo "--- Finished tests with $PYTHON"
26 }
28 function run_all_tests()
29 {
30 for PYTHON in $@;
31 do
32 run_one_test $PYTHON
33 done
34 }
36 while getopts u name
37 do
38 case $name in
39 h) usage; exit 0;;
40 u) ENABLE_UNSUPPORTED=1;;
41 ?) usage; exit 2;;
42 esac
43 done
45 # Build the different python versions
46 (cd regression && make -j4 runtime-environment)
48 # Supported: when an unit test fails this should be seen as an error
49 PYTHON_SUPPORTED="python-2.4 python-2.5 python-2.6"
50 # Unsupported: failure should be seen as a hint
51 PYTHON_UNSUPPORTED="python-3.1"
53 export PYTHONPATH=`echo $PWD/../python/build/lib.*`:$PWD
55 set -e
56 run_all_tests $PYTHON_SUPPORTED
58 if test $ENABLE_UNSUPPORTED -eq 1
59 then
60 run_all_tests $PYTHON_UNSUPPORTED
61 fi