mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-09 16:01:54 -09:00
support/testing: test_screen.py: use assertRunNotOk()
Use the helper to simplify the test.
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit 50ed1540f3)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
This commit is contained in:
committed by
Thomas Perale
parent
3b5e1a62f6
commit
2e5451895d
@@ -27,8 +27,7 @@ class TestScreen(infra.basetest.BRTest):
|
||||
|
||||
# There is no "screen" running yet. Listing sessions is
|
||||
# expected to fail.
|
||||
_, exit_code = self.emulator.run("screen -ls")
|
||||
self.assertNotEqual(exit_code, 0)
|
||||
self.assertRunNotOk("screen -ls")
|
||||
|
||||
# We now start a detached and named session.
|
||||
self.assertRunOk(f"screen -dmS {session_name}")
|
||||
@@ -57,5 +56,4 @@ class TestScreen(infra.basetest.BRTest):
|
||||
|
||||
# Since the session is supposed to be terminated, listing
|
||||
# sessions is expected to fail (again).
|
||||
_, exit_code = self.emulator.run("screen -ls")
|
||||
self.assertNotEqual(exit_code, 0)
|
||||
self.assertRunNotOk("screen -ls")
|
||||
|
||||
Reference in New Issue
Block a user