aboutsummaryrefslogtreecommitdiffstats
path: root/tools/tests/run_tests.sh
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-08-25 14:56:54 +0100
committerKeir Fraser <keir.fraser@citrix.com>2009-08-25 14:56:54 +0100
commit1b14383998f80e4108167ef224a402a28e13f5bd (patch)
tree7e07831fbce7fbe2f8059b206535565fa0861a07 /tools/tests/run_tests.sh
parent552cd79c66dabeafab6ea48d13dd028cb47e76f7 (diff)
downloadxen-1b14383998f80e4108167ef224a402a28e13f5bd.tar.gz
xen-1b14383998f80e4108167ef224a402a28e13f5bd.tar.bz2
xen-1b14383998f80e4108167ef224a402a28e13f5bd.zip
xend: Add support for URI ('file:' and 'data:' scheme) for PV/kernel
and PV/ramdisk Add support for 'file:' and 'data:' URI schemes for the parameters 'PV/kernel' and 'PV/ramdisk' in the VM.create() call. The 'data:' scheme handling enables using a file which is stored inside the management system (from where the XenAPI call is send) as kernel or ramdisk. Notes: o all included: a detailed description can be found in the xenapi documentation o bumped up the version of the API document to 1.0.8 (because of (minimal) interface extension) o Future enhancements (like http:, ftp: schemes) fit seamlessly into the current design / classes o Unittest cases and xm-test case included Signed-off-by: Andreas Florath <xen@flonatel.org>
Diffstat (limited to 'tools/tests/run_tests.sh')
-rw-r--r--tools/tests/run_tests.sh61
1 files changed, 61 insertions, 0 deletions
diff --git a/tools/tests/run_tests.sh b/tools/tests/run_tests.sh
new file mode 100644
index 0000000000..c492876b4b
--- /dev/null
+++ b/tools/tests/run_tests.sh
@@ -0,0 +1,61 @@
+#!/bin/bash
+#
+# This runs the available unit-tests with all different supported
+# python versions.
+#
+# To run this this must be 'cd'ed to the tests directory.
+#
+
+ENABLE_UNSUPPORTED=0
+
+function usage()
+{
+ printf "Usage: %s: [-u]\n" $0
+ printf " -u: run test with unsupported python versions also\n"
+}
+
+function run_one_test()
+{
+ PYTHON=$1
+ PYTHON_EXECUTABLE=`echo $PYTHON | tr -d "-"`
+ echo "+++ Running tests with $PYTHON"
+ export LD_LIBRARY_PATH=./regression/installed/$PYTHON/lib
+ ./regression/installed/$PYTHON/bin/$PYTHON_EXECUTABLE \
+ utests/run_all_tests.py
+ echo "--- Finished tests with $PYTHON"
+}
+
+function run_all_tests()
+{
+ for PYTHON in $@;
+ do
+ run_one_test $PYTHON
+ done
+}
+
+while getopts u name
+do
+ case $name in
+ h) usage; exit 0;;
+ u) ENABLE_UNSUPPORTED=1;;
+ ?) usage; exit 2;;
+ esac
+done
+
+# Build the different python versions
+(cd regression && make -j4 runtime-environment)
+
+# Supported: when an unit test fails this should be seen as an error
+PYTHON_SUPPORTED="python-2.4 python-2.5 python-2.6"
+# Unsupported: failure should be seen as a hint
+PYTHON_UNSUPPORTED="python-3.1"
+
+export PYTHONPATH=`echo $PWD/../python/build/lib.*`:$PWD
+
+set -e
+run_all_tests $PYTHON_SUPPORTED
+
+if test $ENABLE_UNSUPPORTED -eq 1
+then
+ run_all_tests $PYTHON_UNSUPPORTED
+fi