tools/tests: Add syntax check for different versions of python

From: Andreas Florath <xen@flonatel.org>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
This commit is contained in:
Keir Fraser committed 2009-07-28 16:38:08 +01:00
1 parent d7de9aa5e8
commit 59efc1880b
6 files changed
+180

No files matched your search

@@ -0,0 +1,19 @@
#!/bin/bash
#
# Checks the syntax of all .py files
# (compiles them into .pyc files)
#
XEN_ROOT=$1
p=$2
echo "Syntax check for $p"
PYTHON_EXECUTABLE=`echo $p | tr -d "-"`
export LD_LIBRARY_PATH=${XEN_ROOT}/tests/installed/$p/lib
export PATH=${XEN_ROOT}/tests/installed/$p/bin:$PATH
# -m is available starting with python 2.4
# When support for 2.3 (and earlier) is dropped,
# the following line will do.
# ${PYTHON_EXECUTABLE} -m compileall -f -q -x ".*\.hg.*|^\.\./tests/installed.*" ..
${PYTHON_EXECUTABLE} ${XEN_ROOT}/tests/installed/$p/lib/${PYTHON_EXECUTABLE}/compileall.py -f -q -x ".*\.hg.*|.*/tests/installed.*" ..
exit $?
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.