Changeset 14a12d36 in rtems-tools


Ignore:
Timestamp:
09/08/18 04:42:40 (6 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
5, master
Children:
5075e8e
Parents:
e63b9ba
Message:

tester/bsp-builder: Add excluded build options to the base options.

Adding the exclude build options to the base options overrides the
default configure flags. An excluded build could be enabled by
default.

Only pause the jobs loop when it is not a dry run.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tester/rt/check.py

    re63b9ba r14a12d36  
    986986        self.builds_ = builds
    987987
     988    def configs(self):
     989        return sorted(list(self.builds_['config'].keys()))
     990
     991    def config_flags(self, config):
     992        if config not in self.builds_['config']:
     993            raise error.general('config entry not found: %s' % (config))
     994        return self.builds_['config'][config]
     995
    988996    def build(self):
    989997        return self.builds_['build']
     
    10001008        return ' '.join(self._build_options(build))
    10011009
    1002     def excludes(self, arch):
     1010    def excludes(self, arch, bsp):
     1011        return list(set(self.arch_excludes(arch) + self.bsp_excludes(arch, bsp)))
     1012
     1013    def exclude_options(self, arch, bsp):
     1014        return ' '.join([self.config_flags('no-' + e) for e in self.excludes(arch, bsp)])
     1015
     1016    def archs(self):
     1017        return sorted(self.archs.keys())
     1018
     1019    def arch_present(self, arch):
     1020        return arch in self.archs
     1021
     1022    def arch_excludes(self, arch):
    10031023        excludes = self.archs[arch]['excludes'].keys()
    10041024        for exclude in self.archs[arch]['excludes']:
     
    10061026                excludes.remove(exclude)
    10071027        return sorted(excludes)
    1008 
    1009     def archs(self):
    1010         return sorted(self.archs.keys())
    1011 
    1012     def arch_present(self, arch):
    1013         return arch in self.archs
    10141028
    10151029    def arch_bsps(self, arch):
     
    11961210        if self.builds is None:
    11971211            raise error.general('build not found: %s' % (config.build()))
    1198         excludes = list(set(config.excludes(self.arch) +
    1199                             config.bsp_excludes(self.arch, self.bsp)))
     1212        valid_configs = config.configs()
     1213        excludes = config.excludes(self.arch, self.bsp)
     1214        for e in excludes:
     1215            if e.startswith('no-'):
     1216                raise error.general('excludes cannot start with "no-": %s' % (e))
     1217            if e not in valid_configs:
     1218                raise error.general('invalid exclude: %s' % (e))
    12001219        #
    1201         # The build can be in the buld string delimited by '-'.
     1220        # The build can be in the build string delimited by '-'.
    12021221        #
    12031222        remove = []
    12041223        for e in excludes:
    1205             remove += [b for b in self.builds if e in b]
     1224            remove += [b for b in self.builds if e in b.split('-')]
    12061225        self.builds = [b for b in self.builds if b not in remove]
    12071226        self.build_set = { }
     1227        exclude_options = ' ' + config.exclude_options(self.arch, self.bsp)
    12081228        for build in self.builds:
    1209             self.build_set[build] = config.build_options(build)
     1229            self.build_set[build] = config.build_options(build) + exclude_options
    12101230
    12111231    def jobs(self):
     
    13541374                    active_jobs.remove(job)
    13551375                    self.jobs_completed += 1
    1356                 time.sleep(0.250)
     1376                if not self.options['dry-run']:
     1377                    time.sleep(0.100)
    13571378        except:
    13581379            for job in active_jobs:
Note: See TracChangeset for help on using the changeset viewer.