On 01/09/2015 18:44, pvital(a)linux.vnet.ibm.com wrote:
From: Paulo Vital <pvital(a)linux.vnet.ibm.com>
The split of Kimchi code into Wok and Kimchi plugin modified the import
of some classes and packages and the structure of the files store in
development tree.
This patch fixes the PyhtonPath to set the correct paths and creates the
necessary symbolic links to support the tests execution.
Signed-off-by: Paulo Vital <pvital(a)linux.vnet.ibm.com>
---
plugins/kimchi/tests/Makefile.am | 4 ++++
plugins/kimchi/tests/run_tests.sh.in | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/plugins/kimchi/tests/Makefile.am b/plugins/kimchi/tests/Makefile.am
index c1f6784..1c460df 100644
--- a/plugins/kimchi/tests/Makefile.am
+++ b/plugins/kimchi/tests/Makefile.am
@@ -44,6 +44,10 @@ test_config.py: test_config.py.in Makefile
check-local:
$(MKDIR_P) $(top_srcdir)/data/screenshots
+# TODO: this is not the best way to solve the ImportError problem
reported
+# in issue #726, but it solves the problem. Need think better on this.
+ test -L $(abs_top_srcdir)/../../src/wok/plugins || ln -s \
+ $(abs_top_srcdir)/.. $(abs_top_srcdir)/../../src/wok/plugins
Why is it needed?
Maybe we should start working on completely split the build process,
creating one for wok and other one for kimchi.
./run_tests.sh
BUILT_SOURCES = test_config.py
diff --git a/plugins/kimchi/tests/run_tests.sh.in b/plugins/kimchi/tests/run_tests.sh.in
index beef75e..5b98755 100644
--- a/plugins/kimchi/tests/run_tests.sh.in
+++ b/plugins/kimchi/tests/run_tests.sh.in
@@ -52,4 +52,4 @@ for ((i=0;i<${#LIST[@]};i++)); do
fi
done
-PYTHONPATH=../plugins:../src:../ $CMD $OPTS ${MODEL_LIST[@]} ${MOCK_LIST[@]}
+PYTHONPATH=../../../src:../ $CMD $OPTS ${MODEL_LIST[@]} ${MOCK_LIST[@]}
--
2.4.3