Skip to content

Commit 1945fac

Browse files
Médéric RibreuxMédéric RIBREUX
Médéric Ribreux
authored and
Médéric RIBREUX
committed
Temporary make Grass7Utils more verbose for more travis debug
1 parent 8884cd7 commit 1945fac

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

python/plugins/processing/algs/grass7/Grass7Utils.py

+5
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ def executeGrass7(commands, progress, outputCommands=None):
261261
loglines.append(Grass7Utils.tr('GRASS GIS 7 execution console output'))
262262
grassOutDone = False
263263
command, grassenv = Grass7Utils.prepareGrass7Execution(commands)
264+
print('Debug: executeGrass7\n---------------\ncommands: {}\n\ncommand: {}\n\nenv: {}'.format(commands, command, grassenv))
264265
proc = subprocess.Popen(
265266
command,
266267
shell=True,
@@ -271,6 +272,7 @@ def executeGrass7(commands, progress, outputCommands=None):
271272
env=grassenv
272273
).stdout
273274
for line in iter(proc.readline, ''):
275+
print(line)
274276
if 'GRASS_INFO_PERCENT' in line:
275277
try:
276278
progress.setPercentage(int(line[len('GRASS_INFO_PERCENT') + 2:]))
@@ -290,6 +292,8 @@ def executeGrass7(commands, progress, outputCommands=None):
290292

291293
if not grassOutDone and outputCommands:
292294
command, grassenv = Grass7Utils.prepareGrass7Execution(outputCommands)
295+
print('Debug: executeGrass7 outputCommands\n=============\ncommands: {}\n\ncommand: {}\n\nenv: {}'.format(commands, command, grassenv))
296+
293297
proc = subprocess.Popen(
294298
command,
295299
shell=True,
@@ -300,6 +304,7 @@ def executeGrass7(commands, progress, outputCommands=None):
300304
env=grassenv
301305
).stdout
302306
for line in iter(proc.readline, ''):
307+
print(line)
303308
if 'GRASS_INFO_PERCENT' in line:
304309
try:
305310
progress.setPercentage(int(

python/plugins/processing/tests/AlgorithmsTestBase.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,7 @@ def check_algorithm(self, name, defs):
8383
:param defs: A python dict containing a test algorithm definition
8484
"""
8585
QgsMapLayerRegistry.instance().removeAllMapLayers()
86-
print('DEBUG on {}'.format(name))
87-
print('Params = {}'.format(defs))
86+
8887
params = self.load_params(defs['params'])
8988
alg = processing.Processing.getAlgorithm(defs['algorithm']).getCopy()
9089

@@ -185,14 +184,14 @@ def filepath_from_param(self, param):
185184
prefix = processingTestDataPath()
186185
if 'location' in param and param['location'] == 'qgs':
187186
prefix = unitTestDataPath()
188-
print('DEBUG filepath_from_param: {} -> {}'.format(param['name'], os.path.join(prefix, param['name'])))
187+
189188
return os.path.join(prefix, param['name'])
190189

191190
def check_results(self, results, expected):
192191
"""
193192
Checks if result produced by an algorithm matches with the expected specification.
194193
"""
195-
print('DEBUG check_results: results {}\n\texpected {}'.format(results, expected))
194+
196195
for id, expected_result in expected.items():
197196
if 'vector' == expected_result['type']:
198197
expected_lyr = self.load_layer(expected_result)

0 commit comments

Comments
 (0)