diff options
Diffstat (limited to 'meta/lib/oeqa/core/tests/test_decorators.py')
-rwxr-xr-x | meta/lib/oeqa/core/tests/test_decorators.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/meta/lib/oeqa/core/tests/test_decorators.py b/meta/lib/oeqa/core/tests/test_decorators.py index f7d11e885a..cf99e0d72d 100755 --- a/meta/lib/oeqa/core/tests/test_decorators.py +++ b/meta/lib/oeqa/core/tests/test_decorators.py | |||
@@ -131,5 +131,17 @@ class TestTimeoutDecorator(TestBase): | |||
131 | msg = "OETestTimeout didn't restore SIGALRM" | 131 | msg = "OETestTimeout didn't restore SIGALRM" |
132 | self.assertIs(alarm_signal, signal.getsignal(signal.SIGALRM), msg=msg) | 132 | self.assertIs(alarm_signal, signal.getsignal(signal.SIGALRM), msg=msg) |
133 | 133 | ||
134 | def test_timeout_thread(self): | ||
135 | tests = ['timeout.TimeoutTest.testTimeoutPass'] | ||
136 | msg = 'Failed to run test using OETestTimeout' | ||
137 | tc = self._testLoaderThreaded(modules=self.modules, tests=tests) | ||
138 | self.assertTrue(tc.runTests().wasSuccessful(), msg=msg) | ||
139 | |||
140 | def test_timeout_threaded_fail(self): | ||
141 | tests = ['timeout.TimeoutTest.testTimeoutFail'] | ||
142 | msg = "OETestTimeout test didn't timeout as expected" | ||
143 | tc = self._testLoaderThreaded(modules=self.modules, tests=tests) | ||
144 | self.assertFalse(tc.runTests().wasSuccessful(), msg=msg) | ||
145 | |||
134 | if __name__ == '__main__': | 146 | if __name__ == '__main__': |
135 | unittest.main() | 147 | unittest.main() |