libs: add support for developer mode environment

Submodules tracking a "-next" version of the main dependency libraries has
been added by this patch. The environment initialization supports now
a "developer mode" where locally installed libraries are used instead
of system wide installed.

The developer mode allows to use a more recent version of the dependency
libraries. This can be useful to allows clients of the test toolkit to
support testing of experimental features which have not yet been merged into
the external libraries and thus not available via a "pip update" of the
same.

To enable the developer mode you just need to initialize the environment
with the DEVMODE variable set, i.e.
    DEVMODE=1 && source init_env

To switch bach to normal mode (using system installed libs):
    DEVMODE=0 && source init_env

Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
diff --git a/init_env b/init_env
index 8b9e1d3..7099a7c 100644
--- a/init_env
+++ b/init_env
@@ -1,2 +1,25 @@
+
+export PYTHONPATH=''
 export PYTHONPATH=`pwd`/libs/utils:$PYTHONPATH
 export PYTHONPATH=`pwd`/libs/wlgen:$PYTHONPATH
+
+if [ "x$DEVMODE" == "x1" ]; then
+	export PYTHONPATH=`pwd`/libs/devlib:$PYTHONPATH
+	export PYTHONPATH=`pwd`/libs/trappy:$PYTHONPATH
+	export PYTHONPATH=`pwd`/libs/bart:$PYTHONPATH
+
+	echo
+	echo 'Developer mode ENABLED, using libraries provided by submodules'
+	echo 'PYTHONPATH: '
+	echo $PYTHONPATH
+	echo
+
+	if [ ! -f libs/devlib/README.rst ]; then
+		echo 'Initializing submodules...'
+		git submodule init
+	fi
+	echo 'Update submodules if required'
+	git submodule update
+	echo 'DONE'
+fi
+