summaryrefslogtreecommitdiff
path: root/systest
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2011-06-05 19:42:02 +0100
committerLars Wirzenius <liw@liw.fi>2011-06-05 19:42:02 +0100
commiteb4f41cea26612d9161fa1094ad0a0b7c411e64d (patch)
treecb27d3a397cafa3ea51dba08d5369419481788e1 /systest
parent2ad9f2c32c4ade313dbefb96235939ad393f5420 (diff)
downloadsystest-eb4f41cea26612d9161fa1094ad0a0b7c411e64d.tar.gz
Add way for hostcmd and targetcmd to provide stdin contents.
Diffstat (limited to 'systest')
-rwxr-xr-xsystest8
1 files changed, 7 insertions, 1 deletions
diff --git a/systest b/systest
index 2b2af1b..bab5e34 100755
--- a/systest
+++ b/systest
@@ -52,7 +52,9 @@ class SystemTest(cliapp.Application):
return methodname.replace('_', '-')
def hostcmd(self, argv, stdin=None):
- p = subprocess.Popen(argv, stdout=subprocess.PIPE,
+ p = subprocess.Popen(argv,
+ stdin=subprocess.PIPE,
+ stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
out, err = p.communicate(stdin)
if p.returncode:
@@ -106,6 +108,10 @@ class SystemTest(cliapp.Application):
def test_ping_localhost_using_ipv6(self):
self.targetcmd(['ping6', '-c1', 'ip6-localhost'])
+
+ def test_cat_works(self):
+ out = self.targetcmd(['cat'], stdin='foo')
+ self.assertEqual(out, 'foo')
# def test_sudo_works(self):
# out = self.targetcmd(['sudo', 'id'], stdin=self.password)