aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2016-09-09 11:27:11 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-09 12:12:17 +0100
commit4d268abc2fc892c5d34449f78c8e9f2b1a9d6bac (patch)
tree6dc47fafbeb7b5790e06f9918e2355f3e41ba3c8 /meta/lib/oeqa
parentf352c3b71cbf50846c7de31046202296b38713cc (diff)
downloadopenembedded-core-contrib-4d268abc2fc892c5d34449f78c8e9f2b1a9d6bac.tar.gz
oeqa.runtime.smart: work around smart race issues
Yucku hack around test failures which ultimately are caused by a race in smartpm itself. Issuing smartpm commands in quick succession causes races in package cache of smartpm on some systems. This patch mitigates the problem by sleeping for 1 second after each smartpm command that modifies the system. [YOCTO #10244] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r--meta/lib/oeqa/runtime/smart.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/meta/lib/oeqa/runtime/smart.py b/meta/lib/oeqa/runtime/smart.py
index 6cdb10d631..a15e4027d8 100644
--- a/meta/lib/oeqa/runtime/smart.py
+++ b/meta/lib/oeqa/runtime/smart.py
@@ -2,6 +2,7 @@ import unittest
import re
import oe
import subprocess
+from time import sleep
from oeqa.oetest import oeRuntimeTest, skipModule
from oeqa.utils.decorators import *
from oeqa.utils.httpserver import HTTPService
@@ -144,13 +145,21 @@ class SmartRepoTest(SmartTest):
@skipUnlessPassed('test_smart_channel_add')
def test_smart_install(self):
self.smart('remove -y psplash-default')
+ # NOTE: this sleep is a hack for working around #10244
+ sleep(1)
self.smart('install -y psplash-default')
+ # NOTE: this sleep is a hack for working around #10244
+ sleep(1)
@testcase(728)
@skipUnlessPassed('test_smart_install')
def test_smart_install_dependency(self):
self.smart('remove -y psplash')
+ # NOTE: this sleep is a hack for working around #10244
+ sleep(1)
self.smart('install -y psplash-default')
+ # NOTE: this sleep is a hack for working around #10244
+ sleep(1)
@testcase(723)
@skipUnlessPassed('test_smart_channel_add')
@@ -158,6 +167,8 @@ class SmartRepoTest(SmartTest):
self.smart('remove -y psplash-default')
self.smart('download psplash-default')
self.smart('install -y ./psplash-default*')
+ # NOTE: this sleep is a hack for working around #10244
+ sleep(1)
@testcase(725)
@skipUnlessPassed('test_smart_channel_add')
@@ -166,19 +177,29 @@ class SmartRepoTest(SmartTest):
url = re.search('(http://.*/psplash-default.*\.rpm)', output)
self.assertTrue(url, msg="Couln't find download url in %s" % output)
self.smart('remove -y psplash-default')
+ # NOTE: this sleep is a hack for working around #10244
+ sleep(1)
self.smart('install -y %s' % url.group(0))
+ # NOTE: this sleep is a hack for working around #10244
+ sleep(1)
@testcase(729)
@skipUnlessPassed('test_smart_install')
def test_smart_reinstall(self):
self.smart('reinstall -y psplash-default')
+ # NOTE: this sleep is a hack for working around #10244
+ sleep(1)
@testcase(727)
@skipUnlessPassed('test_smart_channel_add')
def test_smart_remote_repo(self):
self.smart('update')
self.smart('install -y psplash')
+ # NOTE: this sleep is a hack for working around #10244
+ sleep(1)
self.smart('remove -y psplash')
+ # NOTE: this sleep is a hack for working around #10244
+ sleep(1)
@testcase(726)
def test_smart_local_dir(self):
@@ -192,6 +213,8 @@ class SmartRepoTest(SmartTest):
self.smart('channel --disable '+str(i))
self.target.run('cd $HOME')
self.smart('install psplash')
+ # NOTE: this sleep is a hack for working around #10244
+ sleep(1)
for i in output.split("\n"):
if ("rpmsys" != str(i)) and ("myrpmdir" != str(i)):
self.smart('channel --enable '+str(i))
@@ -215,4 +238,6 @@ class SmartRepoTest(SmartTest):
@skipUnlessPassed('test_smart_channel_add')
def test_smart_remove_package(self):
self.smart('install -y psplash')
+ # NOTE: this sleep is a hack for working around #10244
+ sleep(1)
self.smart('remove -y psplash')
'#n316'>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 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500