Changeset e5d9274 for tests/pybin


Ignore:
Timestamp:
Jun 2, 2022, 3:11:21 PM (4 years ago)
Author:
caparsons <caparson@…>
Branches:
ADT, ast-experimental, master, pthread-emulation, qualifiedEnum, stuck-waitfor-destruct
Children:
ced5e2a
Parents:
015925a (diff), fc134a48 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
tests/pybin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tests/pybin/settings.py

    r015925a re5d9274  
    201201        global output_width
    202202        output_width = max(map(lambda t: len(t.target()), tests))
     203        # 35 is the maximum width of the name field before we get line wrapping.
     204        output_width = min(output_width, 35)
  • tests/pybin/test_run.py

    r015925a re5d9274  
    4343                return os.path.normpath( os.path.join(settings.BUILDDIR, self.path, self.name) )
    4444
     45        def format_target(self, width):
     46                target = self.target()
     47                length = len(target)
     48                if length < width:
     49                        return '{0:{width}}'.format(target, width=width)
     50                elif length == width:
     51                        return target
     52                else:
     53                        return '...' + target[3-width:]
     54
    4555        @staticmethod
    4656        def valid_name(name):
Note: See TracChangeset for help on using the changeset viewer.