[ovs-dev] [PATCH] tests: Use compat argparse when required.

Ethan Jackson ethan at nicira.com
Tue Sep 27 22:32:13 UTC 2011


Some build environments don't have argparse installed.  In these
cases the test framework will use the compat version.
---
 tests/atlocal.in |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/tests/atlocal.in b/tests/atlocal.in
index 0166f0f..61f08f4 100644
--- a/tests/atlocal.in
+++ b/tests/atlocal.in
@@ -9,3 +9,8 @@ export PYTHONPATH
 
 PYTHONIOENCODING=utf_8
 export PYTHONIOENCODING
+
+if [ $HAVE_PYTHON ] && [ 'python -m argparse' ] ;
+then
+    export PYTHONPATH=$PYTHONPATH:$abs_top_srcdir/python/compat
+fi
-- 
1.7.6.1




More information about the dev mailing list