Skip to content

Commit

Permalink
make testing
Browse files Browse the repository at this point in the history
  • Loading branch information
netblue30 committed Apr 23, 2016
1 parent 2169ead commit 7e1c057
Show file tree
Hide file tree
Showing 14 changed files with 52 additions and 211 deletions.
10 changes: 9 additions & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ dist:
cd $(NAME)-$(VERSION); mkdir -p test; cp -a ../test/profiles test/.; cd ..
cd $(NAME)-$(VERSION); mkdir -p test; cp -a ../test/apps test/.; cd ..
cd $(NAME)-$(VERSION); mkdir -p test; cp -a ../test/utils test/.; cd ..
cd $(NAME)-$(VERSION); mkdir -p test; cp -a ../test/apps-x11 test/.; cd ..
cd $(NAME)-$(VERSION); mkdir -p test; cp -a ../test/firemon test/.; cd ..
cd $(NAME)-$(VERSION); rm -fr `find . -name .svn`; rm -fr $(NAME)-$(VERSION); cd ..
tar -cjvf $(NAME)-$(VERSION).tar.bz2 $(NAME)-$(VERSION)
rm -fr $(NAME)-$(VERSION)
Expand Down Expand Up @@ -271,8 +273,14 @@ test-profiles:
test-apps:
cd test/apps; ./apps.sh | grep TESTING

test-apps-x11:
cd test/apps-x11; ./apps-x11.sh | grep TESTING

test-firemon:
cd test/firemon; ./firemon.sh | grep TESTING

test-utils:
cd test/utils; ./utils.sh | grep TESTING

test: test-profiles test-utils test-apps
test: test-profiles test-utils test-apps test-apps-x11 test-firemon
echo "TEST COMPLETE"
18 changes: 12 additions & 6 deletions test/test-apps-x11.sh → test/apps-x11/apps-x11.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
#!/bin/bash
# This file is part of Firejail project
# Copyright (C) 2014-2016 Firejail Authors
# License GPL v2

export MALLOC_CHECK_=3
export MALLOC_PERTURB_=$(($RANDOM % 255 + 1))

which xterm
if [ "$?" -eq 0 ];
then
echo "TESTING: xterm x11"
./xterm-x11.exp
./xterm.exp
else
echo "TESTING: xterm not found"
fi
Expand All @@ -13,7 +19,7 @@ which firefox
if [ "$?" -eq 0 ];
then
echo "TESTING: firefox x11"
./firefox-x11.exp
./firefox.exp
else
echo "TESTING: firefox not found"
fi
Expand All @@ -22,7 +28,7 @@ which chromium
if [ "$?" -eq 0 ];
then
echo "TESTING: chromium x11"
./chromium-x11.exp
./chromium.exp
else
echo "TESTING: chromium not found"
fi
Expand All @@ -31,7 +37,7 @@ which transmission-gtk
if [ "$?" -eq 0 ];
then
echo "TESTING: transmission-gtk x11"
./transmission-gtk-x11.exp
./transmission-gtk.exp
else
echo "TESTING: transmission-gtk not found"
fi
Expand All @@ -40,8 +46,8 @@ which icedove
if [ "$?" -eq 0 ];
then
echo "TESTING: icedove x11"
./icedove-x11.exp
./icedove.exp
else
echo "TESTING: chromium not found"
echo "TESTING: icedovenot found"
fi

3 changes: 3 additions & 0 deletions test/chromium-x11.exp → test/apps-x11/chromium.exp
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/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)
Expand Down
3 changes: 3 additions & 0 deletions test/firefox-x11.exp → test/apps-x11/firefox.exp
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/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)
Expand Down
3 changes: 3 additions & 0 deletions test/icedove-x11.exp → test/apps-x11/icedove.exp
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/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)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/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)
Expand Down
3 changes: 3 additions & 0 deletions test/xterm-x11.exp → test/apps-x11/xterm.exp
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/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)
Expand Down
202 changes: 0 additions & 202 deletions test/auto/autotest.sh

This file was deleted.

3 changes: 3 additions & 0 deletions test/firemon-caps.exp → test/firemon/caps.exp
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/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)
Expand Down
File renamed without changes.
File renamed without changes.
10 changes: 10 additions & 0 deletions test/firemon/firemon.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
# This file is part of Firejail project
# Copyright (C) 2014-2016 Firejail Authors
# License GPL v2

echo "TESTING: firemon --seccomp (test/firemon/seccomp.exp)"
./seccomp.exp

echo "TESTING: firemon --caps (test/firemon/caps.exp)"
./caps.exp
3 changes: 3 additions & 0 deletions test/firemon-seccomp.exp → test/firemon/seccomp.exp
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/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)
Expand Down
2 changes: 0 additions & 2 deletions test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,6 @@ else
echo "TESTING: dash not found"
fi

./test-apps-x11.sh

echo "TESTING: PID (pid.exp)"
./pid.exp

Expand Down

0 comments on commit 7e1c057

Please sign in to comment.