From 2905b9f9ab5c5ed6f9210d1d843a8bcf41451854 Mon Sep 17 00:00:00 2001 From: netblue30 Date: Sat, 23 Apr 2016 08:53:07 -0400 Subject: make test-utils --- test/utils/tree.exp | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100755 test/utils/tree.exp (limited to 'test/utils/tree.exp') diff --git a/test/utils/tree.exp b/test/utils/tree.exp new file mode 100755 index 000000000..a8ef763f1 --- /dev/null +++ b/test/utils/tree.exp @@ -0,0 +1,63 @@ +#!/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\r" +expect { + timeout {puts "TESTING ERROR 0\n";exit} + "Child process initialized" +} +after 100 + +spawn $env(SHELL) +send -- "firejail\r" +expect { + timeout {puts "TESTING ERROR 1\n";exit} + "Child process initialized" +} +after 100 + +spawn $env(SHELL) +send -- "firejail\r" +expect { + timeout {puts "TESTING ERROR 2\n";exit} + "Child process initialized" +} +sleep 1 + +spawn $env(SHELL) +send -- "firejail --tree\r" +expect { + timeout {puts "TESTING ERROR 3\n";exit} + ":firejail" +} +expect { + timeout {puts "TESTING ERROR 3.1\n";exit} + ":/bin/bash" +} +expect { + timeout {puts "TESTING ERROR 4\n";exit} + ":firejail" +} +expect { + timeout {puts "TESTING ERROR 4.1\n";exit} + ":/bin/bash" +} +expect { + timeout {puts "TESTING ERROR 5\n";exit} + ":firejail" +} +expect { + timeout {puts "TESTING ERROR 5.1\n";exit} + ":/bin/bash" +} +after 100 + + +puts "\n" + -- cgit v1.2.3-70-g09d2