Artifact Content
Not logged in

Artifact 683c21b5c0a592841a0645632d684b845193e781:


#!/usr/bin/expect -f
# This file is part of Firejail project
# Copyright (C) 2014-2016 Firejail Authors
# License GPL v2


set timeout 10
spawn $env(SHELL)
match_max 100000

send -- "firejail --nosound speaker-test\r"
expect {
	timeout {puts "TESTING ERROR 1\n";exit}
	"Child process initialized"
}
expect {
	timeout {puts "TESTING ERROR 2\n";exit}
	"Parent is shutting down"
}
sleep 2

send -- "firejail --nosound aplay -l\r"
expect {
	timeout {puts "TESTING ERROR 3\n";exit}
	"Child process initialized"
}
expect {
	timeout {puts "TESTING ERROR 4\n";exit}
	"List of PLAYBACK" {puts "TESTING ERROR 3\n";exit}
	"no soundcards found"
}
expect {
	timeout {puts "TESTING ERROR 5\n";exit}
	"Parent is shutting down"
}
sleep 2


send -- "firejail --profile=sound.profile speaker-test\r"
expect {
	timeout {puts "TESTING ERROR 11\n";exit}
	"Child process initialized"
}
expect {
	timeout {puts "TESTING ERROR 12\n";exit}
	"Parent is shutting down"
}
sleep 2

send -- "firejail --profile=sound.profile aplay -l\r"
expect {
	timeout {puts "TESTING ERROR 13\n";exit}
	"Child process initialized"
}
expect {
	timeout {puts "TESTING ERROR 14\n";exit}
	"List of PLAYBACK" {puts "TESTING ERROR 3\n";exit}
	"no soundcards found"
}
expect {
	timeout {puts "TESTING ERROR 15\n";exit}
	"Parent is shutting down"
}
sleep 2


send -- "firejail aplay -l\r"
expect {
	timeout {puts "TESTING ERROR 23\n";exit}
	"Child process initialized"
}
expect {
	timeout {puts "TESTING ERROR 24\n";exit}
	"List of PLAYBACK"
}
expect {
	timeout {puts "TESTING ERROR 25\n";exit}
	"Parent is shutting down"
}
after 100

puts "\nall done\n"