Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
More debugging for app startup test
  • Loading branch information
nyalldawson committed Jan 28, 2016
1 parent 4aafed8 commit aca66a7
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions tests/src/python/test_qgsappstartup.py
Expand Up @@ -28,6 +28,8 @@

from utilities import unittest, unitTestDataPath

print 'CTEST_FULL_OUTPUT'

TEST_DATA_DIR = unitTestDataPath()


Expand Down Expand Up @@ -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

Expand All @@ -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):
Expand All @@ -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())})
Expand All @@ -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):
Expand All @@ -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])


Expand Down

0 comments on commit aca66a7

Please sign in to comment.