mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-30 22:11:59 -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
6f44e2660c
commit
31ea7acc54
@@ -27,8 +27,7 @@ class TestScreen(infra.basetest.BRTest):
|
|||||||
|
|
||||||
# There is no "screen" running yet. Listing sessions is
|
# There is no "screen" running yet. Listing sessions is
|
||||||
# expected to fail.
|
# expected to fail.
|
||||||
_, exit_code = self.emulator.run("screen -ls")
|
self.assertRunNotOk("screen -ls")
|
||||||
self.assertNotEqual(exit_code, 0)
|
|
||||||
|
|
||||||
# We now start a detached and named session.
|
# We now start a detached and named session.
|
||||||
self.assertRunOk(f"screen -dmS {session_name}")
|
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
|
# Since the session is supposed to be terminated, listing
|
||||||
# sessions is expected to fail (again).
|
# sessions is expected to fail (again).
|
||||||
_, exit_code = self.emulator.run("screen -ls")
|
self.assertRunNotOk("screen -ls")
|
||||||
self.assertNotEqual(exit_code, 0)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user