瀏覽代碼

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 年之前
父節點
當前提交
138091b3e4
共有 1 個文件被更改,包括 8 次插入0 次删除
  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()
         mapset, mapset_dir = self._create_mapset(gisdbase, location, module)
         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
+        # percentage in plain format is 0...10...20... ...100
+        env['GRASS_MESSAGE_FORMAT'] = 'plain'
 
         stdout_path = os.path.join(cwd, 'stdout.txt')
         stderr_path = os.path.join(cwd, 'stderr.txt')