1
0
mirror of https://github.com/rancher/os.git synced 2025-07-30 22:24:33 +00:00

Fix ros dev panic

This commit is contained in:
Darren Shepherd 2016-02-04 09:25:36 -07:00
parent ce915927be
commit 28bd8b0ccb
2 changed files with 19 additions and 1 deletions

View File

@ -2,10 +2,13 @@ package control
import (
"fmt"
"github.com/codegangsta/cli"
"github.com/rancher/os/util"
)
func devAction(c *cli.Context) {
fmt.Println(util.ResolveDevice(c.Args()[0]))
if len(c.Args()) > 0 {
fmt.Println(util.ResolveDevice(c.Args()[0]))
}
}

View File

@ -31,3 +31,18 @@ def test_run_system_container(qemu):
ssh.wait()
assert ssh.returncode == 0
@pytest.mark.timeout(60)
def test_ros_dev(qemu):
u.wait_for_ssh(qemu)
ssh = subprocess.Popen(
'./scripts/ssh --qemu sudo ros dev',
shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True)
for ln in u.iter_lines(ssh.stdout):
print(ln)
ssh.wait()
assert ssh.returncode == 0