From a3207cdca569d78ee6a9723c7c0dfdf10cd15845 Mon Sep 17 00:00:00 2001 From: netblue30 Date: Sun, 24 Apr 2016 07:50:35 -0400 Subject: testing --- test/environment/sound.exp | 83 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100755 test/environment/sound.exp (limited to 'test/environment/sound.exp') 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 @@ +#!/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" +} +sleep 2 + +puts "\nall done\n" + -- cgit v1.2.3-54-g00ecf