summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/cases/runcmd.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/runcmd.py')
-rw-r--r--meta/lib/oeqa/selftest/cases/runcmd.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/meta/lib/oeqa/selftest/cases/runcmd.py b/meta/lib/oeqa/selftest/cases/runcmd.py
index fa6113d7fa..70047ca0ca 100644
--- a/meta/lib/oeqa/selftest/cases/runcmd.py
+++ b/meta/lib/oeqa/selftest/cases/runcmd.py
@@ -1,4 +1,6 @@
1# 1#
2# Copyright OpenEmbedded Contributors
3#
2# SPDX-License-Identifier: MIT 4# SPDX-License-Identifier: MIT
3# 5#
4 6
@@ -27,8 +29,8 @@ class RunCmdTests(OESelftestTestCase):
27 29
28 # The delta is intentionally smaller than the timeout, to detect cases where 30 # The delta is intentionally smaller than the timeout, to detect cases where
29 # we incorrectly apply the timeout more than once. 31 # we incorrectly apply the timeout more than once.
30 TIMEOUT = 5 32 TIMEOUT = 10
31 DELTA = 3 33 DELTA = 8
32 34
33 def test_result_okay(self): 35 def test_result_okay(self):
34 result = runCmd("true") 36 result = runCmd("true")
@@ -56,11 +58,11 @@ class RunCmdTests(OESelftestTestCase):
56 self.assertEqual(result.status, 0) 58 self.assertEqual(result.status, 0)
57 59
58 def test_result_assertion(self): 60 def test_result_assertion(self):
59 self.assertRaisesRegexp(AssertionError, "Command 'echo .* false' returned non-zero exit status 1:\nfoobar", 61 self.assertRaisesRegex(AssertionError, "Command 'echo .* false' returned non-zero exit status 1:\nfoobar",
60 runCmd, "echo foobar >&2; false", shell=True) 62 runCmd, "echo foobar >&2; false", shell=True)
61 63
62 def test_result_exception(self): 64 def test_result_exception(self):
63 self.assertRaisesRegexp(CommandError, "Command 'echo .* false' returned non-zero exit status 1 with output: foobar", 65 self.assertRaisesRegex(CommandError, "Command 'echo .* false' returned non-zero exit status 1 with output: foobar",
64 runCmd, "echo foobar >&2; false", shell=True, assert_error=False) 66 runCmd, "echo foobar >&2; false", shell=True, assert_error=False)
65 67
66 def test_output(self): 68 def test_output(self):