[Kimchi-devel] [PATCH] bug fix: test case can not find plugin, fix it

Mark Wu wudxw at linux.vnet.ibm.com
Thu Jan 23 05:48:17 UTC 2014


On 01/23/2014 11:29 AM, shaohef at linux.vnet.ibm.com wrote:
> From: ShaoHe Feng <shaohef at linux.vnet.ibm.com>
>
> $ sudo ./run_tests.sh test_rest
> Failed to import plugin plugins.sample.Drawings
>
> That's because plugin is not in src/
>
> Signed-off-by: ShaoHe Feng <shaohef at linux.vnet.ibm.com>
> ---
>   tests/run_tests.sh.in | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tests/run_tests.sh.in b/tests/run_tests.sh.in
> index 2baf66d..038e8fa 100644
> --- a/tests/run_tests.sh.in
> +++ b/tests/run_tests.sh.in
> @@ -31,7 +31,7 @@ else
>   fi
>
>   if [ "$HAVE_UNITTEST" != "yes" -o "$PYTHON_VER" == "2.6" ]; then
> -    PYTHONPATH=../src:./ unit2 $ARGS
> +    PYTHONPATH=../src:./:../ unit2 $ARGS
>   else
> -    PYTHONPATH=../src python -m unittest $ARGS
> +    PYTHONPATH=../src:../ python -m unittest $ARGS
>   fi
We don't put any test cases for plugins in test_rest.  Instead,  we put 
them in test_plugin.  the python path
has been mangled there.




More information about the Kimchi-devel mailing list