summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-14 14:50:48 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-04-25 15:01:21 +0100
commit9a8d6d9fd200fdbd27dce63d6337e8d1fce49533 (patch)
tree044a3d87decf6df05c971b7261f564bd321c262a /meta
parent65681147b2339d119a9e2f864103ea83b544daa3 (diff)
downloadpoky-9a8d6d9fd200fdbd27dce63d6337e8d1fce49533.tar.gz
oeqa: Default to buffer mode for tests
Currently some tests run in buffer mode and some don't. Those that don't can corrupt stdout/stderr. Switch to using buffer mode everywhere so we're consistent. If there is useful output on stdout/stderr, it will be displayed if the test fails. (From OE-Core rev: 85c1b6fb516aae58240330a0aca659bfafcd3883) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oeqa/core/context.py2
-rw-r--r--meta/lib/oeqa/core/runner.py5
-rw-r--r--meta/lib/oeqa/selftest/cases/devtool.py2
-rw-r--r--meta/lib/oeqa/selftest/cases/efibootpartition.py1
-rw-r--r--meta/lib/oeqa/selftest/cases/imagefeatures.py2
-rw-r--r--meta/lib/oeqa/selftest/cases/runqemu.py2
6 files changed, 1 insertions, 13 deletions
diff --git a/meta/lib/oeqa/core/context.py b/meta/lib/oeqa/core/context.py
index ef008454ff..cd6db234a4 100644
--- a/meta/lib/oeqa/core/context.py
+++ b/meta/lib/oeqa/core/context.py
@@ -58,7 +58,7 @@ class OETestContext(object):
58 self.suites = self.loader.discover() 58 self.suites = self.loader.discover()
59 59
60 def runTests(self, skips=[]): 60 def runTests(self, skips=[]):
61 self.runner = self.runnerClass(self, descriptions=False, verbosity=2) 61 self.runner = self.runnerClass(self, descriptions=False, verbosity=2, buffer=True)
62 62
63 # Dinamically skip those tests specified though arguments 63 # Dinamically skip those tests specified though arguments
64 self.skipTests(skips) 64 self.skipTests(skips)
diff --git a/meta/lib/oeqa/core/runner.py b/meta/lib/oeqa/core/runner.py
index f8bb23f344..0e6d215db1 100644
--- a/meta/lib/oeqa/core/runner.py
+++ b/meta/lib/oeqa/core/runner.py
@@ -43,11 +43,6 @@ class OETestResult(_TestResult):
43 self.tc = tc 43 self.tc = tc
44 44
45 def startTest(self, test): 45 def startTest(self, test):
46 # Allow us to trigger the testcase buffer mode on a per test basis
47 # so stdout/stderr are only printed upon failure. Enables debugging
48 # but clean output
49 if hasattr(test, "buffer"):
50 self.buffer = test.buffer
51 super(OETestResult, self).startTest(test) 46 super(OETestResult, self).startTest(test)
52 47
53 def logSummary(self, component, context_msg=''): 48 def logSummary(self, component, context_msg=''):
diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py
index 627bc65e42..99bfcd3d05 100644
--- a/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/meta/lib/oeqa/selftest/cases/devtool.py
@@ -78,8 +78,6 @@ def tearDownModule():
78 78
79class DevtoolBase(OESelftestTestCase): 79class DevtoolBase(OESelftestTestCase):
80 80
81 buffer = True
82
83 def _test_recipe_contents(self, recipefile, checkvars, checkinherits): 81 def _test_recipe_contents(self, recipefile, checkvars, checkinherits):
84 with open(recipefile, 'r') as f: 82 with open(recipefile, 'r') as f:
85 invar = None 83 invar = None
diff --git a/meta/lib/oeqa/selftest/cases/efibootpartition.py b/meta/lib/oeqa/selftest/cases/efibootpartition.py
index 0c83256696..c6f39d5b16 100644
--- a/meta/lib/oeqa/selftest/cases/efibootpartition.py
+++ b/meta/lib/oeqa/selftest/cases/efibootpartition.py
@@ -11,7 +11,6 @@ from oeqa.utils.commands import bitbake, runqemu, get_bb_var
11class GenericEFITest(OESelftestTestCase): 11class GenericEFITest(OESelftestTestCase):
12 """EFI booting test class""" 12 """EFI booting test class"""
13 13
14 buffer = True
15 cmd_common = "runqemu nographic serial wic ovmf" 14 cmd_common = "runqemu nographic serial wic ovmf"
16 efi_provider = "systemd-boot" 15 efi_provider = "systemd-boot"
17 image = "core-image-minimal" 16 image = "core-image-minimal"
diff --git a/meta/lib/oeqa/selftest/cases/imagefeatures.py b/meta/lib/oeqa/selftest/cases/imagefeatures.py
index 09e0b20625..cdfd74b447 100644
--- a/meta/lib/oeqa/selftest/cases/imagefeatures.py
+++ b/meta/lib/oeqa/selftest/cases/imagefeatures.py
@@ -10,8 +10,6 @@ class ImageFeatures(OESelftestTestCase):
10 test_user = 'tester' 10 test_user = 'tester'
11 root_user = 'root' 11 root_user = 'root'
12 12
13 buffer = True
14
15 @OETestID(1107) 13 @OETestID(1107)
16 def test_non_root_user_can_connect_via_ssh_without_password(self): 14 def test_non_root_user_can_connect_via_ssh_without_password(self):
17 """ 15 """
diff --git a/meta/lib/oeqa/selftest/cases/runqemu.py b/meta/lib/oeqa/selftest/cases/runqemu.py
index 8f4084d4b4..a23a1d8735 100644
--- a/meta/lib/oeqa/selftest/cases/runqemu.py
+++ b/meta/lib/oeqa/selftest/cases/runqemu.py
@@ -15,8 +15,6 @@ class RunqemuTests(OESelftestTestCase):
15 15
16 image_is_ready = False 16 image_is_ready = False
17 deploy_dir_image = '' 17 deploy_dir_image = ''
18 # We only want to print runqemu stdout/stderr if there is a test case failure
19 buffer = True
20 18
21 def setUpLocal(self): 19 def setUpLocal(self):
22 super(RunqemuTests, self).setUpLocal() 20 super(RunqemuTests, self).setUpLocal()