Browse Source

gunittest: switch to more plain percentage output (https://trac.osgeo.org/grass/ticket/2458, percentage in standard format are replaced by new percentage which might give strange results when included into a text file)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@64886 15284696-431f-4ddb-bdfa-cd5b030d7da7
Vaclav Petras 10 years ago
parent
commit
138091b3e4
1 changed files with 8 additions and 0 deletions
  1. 8 0
      lib/python/gunittest/invoker.py

+ 8 - 0
lib/python/gunittest/invoker.py

@@ -135,7 +135,15 @@ class GrassTestFilesInvoker(object):
         env = os.environ.copy()
         env = os.environ.copy()
         mapset, mapset_dir = self._create_mapset(gisdbase, location, module)
         mapset, mapset_dir = self._create_mapset(gisdbase, location, module)
         gisrc = gsetup.write_gisrc(gisdbase, location, mapset)
         gisrc = gsetup.write_gisrc(gisdbase, location, mapset)
+
+        # here is special setting of environmental variables for running tests
+        # some of them might be set from outside in the future and if the list
+        # will be long they should be stored somewhere separately
+
+        # use custom gisrc, not current session gisrc
         env['GISRC'] = gisrc
         env['GISRC'] = gisrc
+        # percentage in plain format is 0...10...20... ...100
+        env['GRASS_MESSAGE_FORMAT'] = 'plain'
 
 
         stdout_path = os.path.join(cwd, 'stdout.txt')
         stdout_path = os.path.join(cwd, 'stdout.txt')
         stderr_path = os.path.join(cwd, 'stderr.txt')
         stderr_path = os.path.join(cwd, 'stderr.txt')