Skip to content
Permalink
Browse files

More debugging for app startup test

  • Loading branch information
nyalldawson committed Jan 28, 2016
1 parent 4aafed8 commit aca66a710f32f0e79c7b926fe58b515fedfc1226
Showing with 9 additions and 5 deletions.
  1. +9 −5 tests/src/python/test_qgsappstartup.py
@@ -28,6 +28,8 @@

from utilities import unittest, unitTestDataPath

print 'CTEST_FULL_OUTPUT'

TEST_DATA_DIR = unitTestDataPath()


@@ -84,11 +86,13 @@ def doTestStartup(self, option='', testDir='', testFile='',
while not os.path.exists(myTestFile):
p.poll()
if p.returncode is not None:
print 'Application has returned: {}'.format(p.returncode)
ok = False
break
time.sleep(1)
s += 1
if s > timeOut:
print 'Timed out waiting for application start'
ok = False
break

@@ -109,14 +113,14 @@ def testOptionsPath(self):
assert self.doTestStartup(option="--optionspath",
testDir=os.path.join(self.TMP_DIR, p),
testFile=ini,
timeOut=5), "options path %s" % p
timeOut=90), "options path %s" % p

def testConfigPath(self):
for p in ['test_config', 'test config', u'test_configé€']:
assert self.doTestStartup(option="--configpath",
testDir=os.path.join(self.TMP_DIR, p),
testFile="qgis.db",
timeOut=15), "config path %s" % p
timeOut=90), "config path %s" % p

@unittest.expectedFailure
def testPluginPath(self):
@@ -140,7 +144,7 @@ def testPluginPath(self):
option="--optionspath",
testDir=testDir,
testFile="plugin_started.txt",
timeOut=15,
timeOut=90,
loadPlugins=True,
env={'QGIS_PLUGINPATH':
str(QtCore.QString(testDir).toLocal8Bit())})
@@ -162,7 +166,7 @@ def testPyQgisStartupEnvVar(self):
msg = 'Creation of test file by executing PYQGIS_STARTUP file failed'
assert self.doTestStartup(
testFile=testfilepath,
timeOut=120,
timeOut=90,
env={'PYQGIS_STARTUP': testmod}), msg

def testOptionsAsFiles(self):
@@ -173,7 +177,7 @@ def testOptionsAsFiles(self):
assert t[0] == self.doTestStartup(option="--configpath",
testDir=os.path.join(self.TMP_DIR, 'test_optionsAsFiles'),
testFile="qgis.db",
timeOut=15,
timeOut=90,
additionalArguments=t[1]), "additional arguments: %s" % ' '.join(t[1])


0 comments on commit aca66a7

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