aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/lib/compatlayer
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2017-04-11 20:38:40 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-04-12 15:02:14 +0100
commit67f9a8759f47680dbf349797801b2a1e8d149377 (patch)
tree82199ce261325d5bdb2ed913ad8ee51df3a4cdf9 /scripts/lib/compatlayer
parent312edd42b6cc553de4d476c76e8e36a882e11cdd (diff)
downloadopenembedded-core-contrib-67f9a8759f47680dbf349797801b2a1e8d149377.tar.gz
yocto-compat-layer: also determine tune flags for each task
locked-sigs.inc groups tasks according to their tune flags (allarch, i586, etc.). Also retrieve that information while getting signatures, it will be needed to determine when setting a machine changes tasks that aren't machine-specific. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/compatlayer')
-rw-r--r--scripts/lib/compatlayer/__init__.py9
-rw-r--r--scripts/lib/compatlayer/cases/common.py2
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):
exclude_recipes = ('meta-world-pkgdata',)
sigs = {}
+ tune2tasks = {}
cmd = 'bitbake '
if failsafe:
@@ -234,9 +235,14 @@ def get_signatures(builddir, failsafe=False):
sigs_file = os.path.join(builddir, 'locked-sigs.inc')
sig_regex = re.compile("^(?P<task>.*:.*):(?P<hash>.*) .$")
+ tune_regex = re.compile("(^|\s)SIGGEN_LOCKEDSIGS_t-(?P<tune>\S*)\s*=\s*")
+ current_tune = None
with open(sigs_file, 'r') as f:
for line in f.readlines():
line = line.strip()
+ t = tune_regex.search(line)
+ if t:
+ current_tune = t.group('tune')
s = sig_regex.match(line)
if s:
exclude = False
@@ -249,11 +255,12 @@ def get_signatures(builddir, failsafe=False):
continue
sigs[s.group('task')] = s.group('hash')
+ tune2tasks.setdefault(current_tune, []).append(s.group('task'))
if not sigs:
raise RuntimeError('Can\'t load signatures from %s' % sigs_file)
- return sigs
+ return (sigs, tune2tasks)
def get_depgraph(targets=['world']):
'''
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):
# task -> (old signature, new signature)
sig_diff = {}
- curr_sigs = get_signatures(self.td['builddir'], failsafe=True)
+ curr_sigs, _ = get_signatures(self.td['builddir'], failsafe=True)
for task in self.td['sigs']:
if task in curr_sigs and \
self.td['sigs'][task] != curr_sigs[task]:
96 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438