Commits

holger krekel committed df3ccae

refine reporting to use less horizontal space

  • Participants
  • Parent commits c94cd6d

Comments (0)

Files changed (4)

 cross-host tox run protope break through
 --------------------------------------------
-tags: feature hl
+tags: braindump feature hl
 
 Try to get a detox run like this to work:
 

detox/__init__.py

-__version__ = '0.4.dev3'
+__version__ = '0.9'
 
 
 class ToxReporter(tox._cmdline.Reporter):
-    actionchar = "+"
+    sortorder = ("runtests installdeps sdist-reinst sdist-inst sdist-make "
+                 "create recreate".split())
 
     def _loopreport(self):
         filespinner = FileSpinner()
         while 1:
             eventlet.sleep(0.2)
             msg = []
+            ac2popenlist = {}
             for action in self.session._actions:
                 for popen in action._popenlist:
                     if popen.poll() is None:
-                        spinnchar = filespinner.getchar(popen.outpath)
-                        if action.venv:
-                            id = action.venv.envconfig.envname
-                        else:
-                            id = ""
-                        msg.append("%s %s %s" % (
-                            id, action.activity, spinnchar))
+                        l = ac2popenlist.setdefault(action.activity, [])
+                        l.append(popen)
+
+            for acname in self.sortorder:
+                try:
+                    popenlist = ac2popenlist.pop(acname)
+                except KeyError:
+                    continue
+                sublist = []
+                for popen in popenlist:
+                    name = getattr(popen.action.venv, 'name', "GLOB")
+                    char = filespinner.getchar(popen.outpath)
+                    sublist.append("%s%s" % (name, char))
+                msg.append("%s %s" % (acname, " ".join(sublist)))
+            assert not ac2popenlist, ac2popenlist
             if msg:
                 self.tw.reline("   ".join(msg))
 
 
     detox
 
-in the same way you would run ``tox``.  For documentation and examples for tox
-please refer to the `tox home page`_.
+in the same way and with the same options with which you would run
+``tox``, see the `tox home page`_ for more info.
 
 .. _`tox home page`: http://tox.testrun.org/
 """
         name='detox',
         description='distributing activities of the tox tool',
         long_description = long_description,
-        version='0.4.dev4',
+        version='0.9',
         url='http://bitbucket.org/hpk42/detox',
         license='AGPL3',
         platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'],
                      'Programming Language :: Python',
                      'Programming Language :: Python :: 3'],
         packages=['detox', ],
-        install_requires=['tox>=1.4.dev3',
-            'py>=1.4.7.dev3', 'eventlet>=0.9.16',],
+        install_requires=['tox>=1.4.dev9',
+            'py>=1.4.9.dev1', 'eventlet>=0.9.16',],
         entry_points={'console_scripts': 'detox=detox.main:main'},
     )