Skip TestRunDeviceDirectory when no /dev/snd

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
Brian Goff 2015-09-16 14:43:30 -04:00
parent a90ed92df0
commit 88b895111b
1 changed files with 3 additions and 0 deletions

View File

@ -87,6 +87,9 @@ func (s *DockerSuite) TestRunWithVolumesIsRecursive(c *check.C) {
func (s *DockerSuite) TestRunDeviceDirectory(c *check.C) {
testRequires(c, NativeExecDriver)
if _, err := os.Stat("/dev/snd"); err != nil {
c.Skip("Host does not have /dev/snd")
}
out, _ := dockerCmd(c, "run", "--device", "/dev/snd:/dev/snd", "busybox", "sh", "-c", "ls /dev/snd/")
if actual := strings.Trim(out, "\r\n"); !strings.Contains(out, "timer") {