mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
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:
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 $?
|
||||