From: Ethan Jackson Date: Tue, 27 Sep 2011 22:31:18 +0000 (-0700) Subject: tests: Use compat argparse when required. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=42c2ebcdadeb3aaf3ba128465b5fc58f027868ea;p=openvswitch tests: Use compat argparse when required. Some build environments don't have argparse installed. In these cases the test framework will use the compat version. --- diff --git a/tests/atlocal.in b/tests/atlocal.in index 0166f0f0..7f09143f 100644 --- a/tests/atlocal.in +++ b/tests/atlocal.in @@ -9,3 +9,12 @@ export PYTHONPATH PYTHONIOENCODING=utf_8 export PYTHONIOENCODING + +if test $HAVE_PYTHON = yes; then + if python -m argparse 2>/dev/null; then + : + else + PYTHONPATH=$PYTHONPATH:$abs_top_srcdir/python/compat + export PYTHONPATH + fi +fi