aboutsummaryrefslogtreecommitdiffstats
path: root/test/environment/sound.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/environment/sound.exp')
-rwxr-xr-xtest/environment/sound.exp83
1 files changed, 83 insertions, 0 deletions
diff --git a/test/environment/sound.exp b/test/environment/sound.exp
new file mode 100755
index 000000000..e2e8fb610
--- /dev/null
+++ b/test/environment/sound.exp
@@ -0,0 +1,83 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
5
6
7set timeout 10
8spawn $env(SHELL)
9match_max 100000
10
11send -- "firejail --nosound speaker-test\r"
12expect {
13 timeout {puts "TESTING ERROR 1\n";exit}
14 "Child process initialized"
15}
16expect {
17 timeout {puts "TESTING ERROR 2\n";exit}
18 "Parent is shutting down"
19}
20sleep 2
21
22send -- "firejail --nosound aplay -l\r"
23expect {
24 timeout {puts "TESTING ERROR 3\n";exit}
25 "Child process initialized"
26}
27expect {
28 timeout {puts "TESTING ERROR 4\n";exit}
29 "List of PLAYBACK" {puts "TESTING ERROR 3\n";exit}
30 "no soundcards found"
31}
32expect {
33 timeout {puts "TESTING ERROR 5\n";exit}
34 "Parent is shutting down"
35}
36sleep 2
37
38
39send -- "firejail --profile=sound.profile speaker-test\r"
40expect {
41 timeout {puts "TESTING ERROR 11\n";exit}
42 "Child process initialized"
43}
44expect {
45 timeout {puts "TESTING ERROR 12\n";exit}
46 "Parent is shutting down"
47}
48sleep 2
49
50send -- "firejail --profile=sound.profile aplay -l\r"
51expect {
52 timeout {puts "TESTING ERROR 13\n";exit}
53 "Child process initialized"
54}
55expect {
56 timeout {puts "TESTING ERROR 14\n";exit}
57 "List of PLAYBACK" {puts "TESTING ERROR 3\n";exit}
58 "no soundcards found"
59}
60expect {
61 timeout {puts "TESTING ERROR 15\n";exit}
62 "Parent is shutting down"
63}
64sleep 2
65
66
67send -- "firejail aplay -l\r"
68expect {
69 timeout {puts "TESTING ERROR 23\n";exit}
70 "Child process initialized"
71}
72expect {
73 timeout {puts "TESTING ERROR 24\n";exit}
74 "List of PLAYBACK"
75}
76expect {
77 timeout {puts "TESTING ERROR 25\n";exit}
78 "Parent is shutting down"
79}
80sleep 2
81
82puts "\nall done\n"
83