From 359248902e92c286cdb1dd4a9e978fab30334508 Mon Sep 17 00:00:00 2001 From: netblue30 Date: Fri, 11 Mar 2016 08:58:56 -0500 Subject: testing --- test/sound.exp | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ test/sound.profile | 1 + test/test.sh | 3 +++ 3 files changed, 83 insertions(+) create mode 100755 test/sound.exp create mode 100644 test/sound.profile (limited to 'test') diff --git a/test/sound.exp b/test/sound.exp new file mode 100755 index 000000000..7df50bf16 --- /dev/null +++ b/test/sound.exp @@ -0,0 +1,79 @@ +#!/usr/bin/expect -f + +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" +} +sleep 2 + +puts "\n" + diff --git a/test/sound.profile b/test/sound.profile new file mode 100644 index 000000000..2f83a0bbb --- /dev/null +++ b/test/sound.profile @@ -0,0 +1 @@ +nosound diff --git a/test/test.sh b/test/test.sh index cb3cd728a..2dcb89f2a 100755 --- a/test/test.sh +++ b/test/test.sh @@ -6,6 +6,9 @@ ./fscheck.sh +echo "TESTING: sound (sound.exp)" +./sound.exp + echo "TESTING: nice (nice.exp)" ./nice.exp -- cgit v1.2.3-54-g00ecf