Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/pybin/settings.py

    r64cf022 rabec2f8  
    2323class Architecture:
    2424        KnownArchitectures = {
    25                 'x64'         : 'x64',
    26                 'x86-64'      : 'x64',
    27                 'x86_64'      : 'x64',
    28                 'x86'         : 'x86',
    29                 'aarch64'     : 'arm',
    30                 'i386'        : 'x86',
    31                 'i486'        : 'x86',
    32                 'i686'        : 'x86',
    33                 'Intel 80386' : 'x86',
    34                 'arm'         : 'arm',
    35                 'ARM'         : 'arm',
     25                'x64'           : 'x64',
     26                'x86-64'        : 'x64',
     27                'x86_64'        : 'x64',
     28                'x86'           : 'x86',
     29                'aarch64'       : 'arm',
     30                'i386'          : 'x86',
     31                'i486'          : 'x86',
     32                'i686'          : 'x86',
     33                'Intel 80386'   : 'x86',
     34                'arm'           : 'arm',
     35                'ARM'           : 'arm',
    3636        }
    3737
     
    7777                        print("updated to %s" % self.target)
    7878
    79         def filter(self, tests):
    80                 return [test for test in tests if not test.arch or self.target == test.arch]
     79        def match(self, arch):
    8180                return True if not arch else self.target == arch
    8281
    83         @staticmethod
    84         def make_canonical(arch):
     82        @classmethod
     83        def make_canonical(_, arch):
    8584                return Architecture.KnownArchitectures[arch]
    8685
     
    105104                self.total  = Timeouts.check(tg)
    106105
    107         @staticmethod
    108         def check(value):
     106        @classmethod
     107        def check(_, value):
    109108                if value < 1:
    110109                        print("Timeouts must be at least 1 second", file=sys.stderr)
     
    114113
    115114def init( options ):
    116         global all_arch
    117         global all_debug
    118         global all_install
    119115        global arch
    120116        global archive
    121         global continue_
    122117        global debug
     118        global distcc
    123119        global dry_run
    124120        global generating
     
    127123        global output_width
    128124        global timeout
    129         global timeout2gdb
    130125
    131         all_arch     = [Architecture(o) for o in list(dict.fromkeys(options.arch   ))] if options.arch else [Architecture(None)]
    132         all_debug    = [Debug(o)        for o in list(dict.fromkeys(options.debug  ))]
    133         all_install  = [Install(o)      for o in list(dict.fromkeys(options.install))]
     126        arch         = Architecture(options.arch)
    134127        archive      = os.path.abspath(os.path.join(original_path, options.archive_errors)) if options.archive_errors else None
    135         continue_    = options.continue_
     128        debug        = Debug(options.debug)
    136129        dry_run      = options.dry_run # must be called before tools.config_hash()
     130        distcc       = "DISTCC_CFA_PATH=~/.cfadistcc/%s/cfa" % tools.config_hash()
    137131        generating   = options.regenerate_expected
     132        install      = Install(options.install)
    138133        make         = ['make']
    139134        output_width = 24
    140135        timeout      = Timeouts(options.timeout, options.global_timeout)
    141         timeout2gdb  = options.timeout_with_gdb
    142136
    143137        # if we distribute, distcc errors will fail tests, use log file for distcc
     
    152146
    153147def validate():
    154         """Validate the current configuration and update globals"""
    155 
    156         global distcc
    157         distcc       = "DISTCC_CFA_PATH=~/.cfadistcc/%s/cfa" % tools.config_hash()
    158148        errf = os.path.join(BUILDDIR, ".validate.err")
    159149        make_ret, out = tools.make( ".validate", error_file = errf, output_file=subprocess.DEVNULL, error=subprocess.DEVNULL )
Note: See TracChangeset for help on using the changeset viewer.