[Replicant] [libsamsung-ipc] [PATCH 09/26] tests: ipc-modem: add phone number argument test

Denis 'GNUtoo' Carikli GNUtoo at cyberdimension.org
Mon Mar 28 20:20:23 UTC 2022


Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at cyberdimension.org>
---
 tools/ipc-modem.py | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/tools/ipc-modem.py b/tools/ipc-modem.py
index 52361eb..fd2c905 100755
--- a/tools/ipc-modem.py
+++ b/tools/ipc-modem.py
@@ -70,11 +70,25 @@ class IpcModem(object):
         else:
             raise Exception()
 
+    def test_call(self, timeout=3):
+        expected_output = "[I] Got call number!"
+        output = ""
+        try:
+            output = get_output(self.ipc_modem('power-on',
+                                               '--call=0102030405',
+                                               _timeout=timeout))
+        except:
+            raise Exception()
+
+        if output != expected_output:
+            raise Exception()
+
     def test_commands(self):
         self.test_boot()
         self.test_power_on()
         self.test_power_off()
         self.test_start()
+        self.test_call()
 
 def main():
     ipc_modem = IpcModem()
-- 
2.35.1



More information about the Replicant mailing list