diff options
Diffstat (limited to 'scripts/lib')
| -rw-r--r-- | scripts/lib/compatlayer/__init__.py | 9 | ||||
| -rw-r--r-- | scripts/lib/compatlayer/cases/common.py | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/scripts/lib/compatlayer/__init__.py b/scripts/lib/compatlayer/__init__.py index b46527a185..6130b8548c 100644 --- a/scripts/lib/compatlayer/__init__.py +++ b/scripts/lib/compatlayer/__init__.py | |||
| @@ -224,6 +224,7 @@ def get_signatures(builddir, failsafe=False): | |||
| 224 | exclude_recipes = ('meta-world-pkgdata',) | 224 | exclude_recipes = ('meta-world-pkgdata',) |
| 225 | 225 | ||
| 226 | sigs = {} | 226 | sigs = {} |
| 227 | tune2tasks = {} | ||
| 227 | 228 | ||
| 228 | cmd = 'bitbake ' | 229 | cmd = 'bitbake ' |
| 229 | if failsafe: | 230 | if failsafe: |
| @@ -234,9 +235,14 @@ def get_signatures(builddir, failsafe=False): | |||
| 234 | sigs_file = os.path.join(builddir, 'locked-sigs.inc') | 235 | sigs_file = os.path.join(builddir, 'locked-sigs.inc') |
| 235 | 236 | ||
| 236 | sig_regex = re.compile("^(?P<task>.*:.*):(?P<hash>.*) .$") | 237 | sig_regex = re.compile("^(?P<task>.*:.*):(?P<hash>.*) .$") |
| 238 | tune_regex = re.compile("(^|\s)SIGGEN_LOCKEDSIGS_t-(?P<tune>\S*)\s*=\s*") | ||
| 239 | current_tune = None | ||
| 237 | with open(sigs_file, 'r') as f: | 240 | with open(sigs_file, 'r') as f: |
| 238 | for line in f.readlines(): | 241 | for line in f.readlines(): |
| 239 | line = line.strip() | 242 | line = line.strip() |
| 243 | t = tune_regex.search(line) | ||
| 244 | if t: | ||
| 245 | current_tune = t.group('tune') | ||
| 240 | s = sig_regex.match(line) | 246 | s = sig_regex.match(line) |
| 241 | if s: | 247 | if s: |
| 242 | exclude = False | 248 | exclude = False |
| @@ -249,11 +255,12 @@ def get_signatures(builddir, failsafe=False): | |||
| 249 | continue | 255 | continue |
| 250 | 256 | ||
| 251 | sigs[s.group('task')] = s.group('hash') | 257 | sigs[s.group('task')] = s.group('hash') |
| 258 | tune2tasks.setdefault(current_tune, []).append(s.group('task')) | ||
| 252 | 259 | ||
| 253 | if not sigs: | 260 | if not sigs: |
| 254 | raise RuntimeError('Can\'t load signatures from %s' % sigs_file) | 261 | raise RuntimeError('Can\'t load signatures from %s' % sigs_file) |
| 255 | 262 | ||
| 256 | return sigs | 263 | return (sigs, tune2tasks) |
| 257 | 264 | ||
| 258 | def get_depgraph(targets=['world']): | 265 | def get_depgraph(targets=['world']): |
| 259 | ''' | 266 | ''' |
diff --git a/scripts/lib/compatlayer/cases/common.py b/scripts/lib/compatlayer/cases/common.py index a4c2a51aba..8eeada9b1e 100644 --- a/scripts/lib/compatlayer/cases/common.py +++ b/scripts/lib/compatlayer/cases/common.py | |||
| @@ -33,7 +33,7 @@ class CommonCompatLayer(OECompatLayerTestCase): | |||
| 33 | 33 | ||
| 34 | # task -> (old signature, new signature) | 34 | # task -> (old signature, new signature) |
| 35 | sig_diff = {} | 35 | sig_diff = {} |
| 36 | curr_sigs = get_signatures(self.td['builddir'], failsafe=True) | 36 | curr_sigs, _ = get_signatures(self.td['builddir'], failsafe=True) |
| 37 | for task in self.td['sigs']: | 37 | for task in self.td['sigs']: |
| 38 | if task in curr_sigs and \ | 38 | if task in curr_sigs and \ |
| 39 | self.td['sigs'][task] != curr_sigs[task]: | 39 | self.td['sigs'][task] != curr_sigs[task]: |
