Skip to content
Permalink
Browse files

Merge pull request #8565 from elpaso/docker-testing-env-fixes

Docker testing env minor fixes and improvements
  • Loading branch information
elpaso committed Nov 29, 2018
2 parents f10b62c + 52eeaba commit 88d962ff6cf33bc214b705749fb22fd41e32f08a
@@ -8,7 +8,7 @@
# - create the folders
# - install startup.py monkey patches
# - disable tips
# - enable the plugin
# - enable the plugin (optionally)

PLUGIN_NAME=$1
CONF_MASTER_FOLDER="/root/.local/share/QGIS/QGIS3/profiles/default/QGIS/"
@@ -42,20 +42,17 @@ if [ -n "$PLUGIN_NAME" ]; then
# Enable plugin
printf '[PythonPlugins]\n' >> $CONF_MASTER_FILE
printf "%s=true\n\n" "$PLUGIN_NAME" >> $CONF_MASTER_FILE
# Install the plugin
if [ ! -d "${PLUGIN_MASTER_FOLDER}/${PLUGIN_NAME}" ]; then
ln -s "/tests_directory/${PLUGIN_NAME}" "${PLUGIN_MASTER_FOLDER}"
echo "Plugin master folder linked in ${PLUGIN_MASTER_FOLDER}/${PLUGIN_NAME}"
fi
fi

# Disable firstRunVersionFlag for master
{
printf
"\n[migration]\n"
"fileVersion=2\n"
"firstRunVersionFlag=30500\n"
"settings=true\n\n"
} >> $CONF_MASTER_FILE


# Install the plugin
if [ ! -d "${PLUGIN_MASTER_FOLDER}/${PLUGIN_NAME}" ]; then
ln -s "/tests_directory/${PLUGIN_NAME}" "${PLUGIN_MASTER_FOLDER}"
echo "Plugin master folder linked in ${PLUGIN_MASTER_FOLDER}/${PLUGIN_NAME}"
fi
echo "
[migration]
fileVersion=2
firstRunVersionFlag=30500
settings=true
" >> $CONF_MASTER_FILE
@@ -70,7 +70,7 @@ def __get_test_function(test_module_name):
test_module = importlib.import_module(test_module_name)
function_name = 'run_all'
except ImportError as e:
traceback.print_exc(file=sys.stdout)
#traceback.print_exc(file=sys.stdout)
# Strip latest name
pos = test_module_name.rfind('.')
if pos <= 0:
@@ -81,7 +81,7 @@ def __get_test_function(test_module_name):
try:
test_module = importlib.import_module(test_module_name)
except ImportError as e:
traceback.print_exc(file=sys.stdout)
#traceback.print_exc(file=sys.stdout)
raise e
return getattr(test_module, function_name, None)

@@ -132,7 +132,7 @@ def __get_test_function(test_module_name):
else: # We are inside QGIS!
# Start as soon as the initializationCompleted signal is fired
from qgis.core import QgsApplication, QgsProjectBadLayerHandler, QgsProject
from PyQt.QtCore import QDir
from qgis.PyQt.QtCore import QDir
from qgis.utils import iface

class QgsProjectBadLayerDefaultHandler(QgsProjectBadLayerHandler):

0 comments on commit 88d962f

Please sign in to comment.
You can’t perform that action at this time.