diff options
author | netblue30 <netblue30@yahoo.com> | 2016-04-21 14:37:53 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2016-04-21 14:37:53 -0400 |
commit | ad2f7bc496e3cc83bca2381515312dd2ef6fc7f1 (patch) | |
tree | 0a923afb486b1f13ab35d26138cdbf51e0961aec | |
parent | --read-write option (diff) | |
download | firejail-ad2f7bc496e3cc83bca2381515312dd2ef6fc7f1.tar.gz firejail-ad2f7bc496e3cc83bca2381515312dd2ef6fc7f1.tar.zst firejail-ad2f7bc496e3cc83bca2381515312dd2ef6fc7f1.zip |
make test-profiles
-rw-r--r-- | Makefile.in | 5 | ||||
-rwxr-xr-x | test/profiles/profile_syntax.exp (renamed from test/profile_syntax.exp) | 3 | ||||
-rwxr-xr-x | test/profiles/profile_syntax2.exp (renamed from test/profile_syntax2.exp) | 3 | ||||
-rwxr-xr-x | test/profiles/profiles.sh | 19 | ||||
-rwxr-xr-x | test/profiles/test-profile.exp (renamed from test/test-profile.exp) | 3 | ||||
-rw-r--r-- | test/profiles/test.profile (renamed from test/test.profile) | 0 | ||||
-rw-r--r-- | test/profiles/test2.profile (renamed from test/test2.profile) | 0 | ||||
-rwxr-xr-x | test/test-profiles.sh | 10 | ||||
-rwxr-xr-x | test/test.sh | 8 |
9 files changed, 33 insertions, 18 deletions
diff --git a/Makefile.in b/Makefile.in index dfeea565b..8bf9d68a9 100644 --- a/Makefile.in +++ b/Makefile.in | |||
@@ -239,6 +239,7 @@ dist: | |||
239 | cd $(NAME)-$(VERSION); cp -a ../src .; cp -a ../etc .; cp -a ../platform .; rm -fr src/tools; cd .. | 239 | cd $(NAME)-$(VERSION); cp -a ../src .; cp -a ../etc .; cp -a ../platform .; rm -fr src/tools; cd .. |
240 | cd $(NAME)-$(VERSION); cp -a ../configure .; cp -a ../configure.ac .; cp -a ../Makefile.in .; cp -a ../install.sh .; cp -a ../mkman.sh .; cp -a ../mketc.sh .; cp -a ../mkdeb.sh .;cd .. | 240 | cd $(NAME)-$(VERSION); cp -a ../configure .; cp -a ../configure.ac .; cp -a ../Makefile.in .; cp -a ../install.sh .; cp -a ../mkman.sh .; cp -a ../mketc.sh .; cp -a ../mkdeb.sh .;cd .. |
241 | cd $(NAME)-$(VERSION); cp -a ../COPYING .; cp -a ../README .; cp -a ../RELNOTES .; cd .. | 241 | cd $(NAME)-$(VERSION); cp -a ../COPYING .; cp -a ../README .; cp -a ../RELNOTES .; cd .. |
242 | cd $(NAME)-$(VERSION); mkdir -p test; cp -a ../test/profiles test/.; cd .. | ||
242 | cd $(NAME)-$(VERSION); rm -fr `find . -name .svn`; rm -fr $(NAME)-$(VERSION); cd .. | 243 | cd $(NAME)-$(VERSION); rm -fr `find . -name .svn`; rm -fr $(NAME)-$(VERSION); cd .. |
243 | tar -cjvf $(NAME)-$(VERSION).tar.bz2 $(NAME)-$(VERSION) | 244 | tar -cjvf $(NAME)-$(VERSION).tar.bz2 $(NAME)-$(VERSION) |
244 | rm -fr $(NAME)-$(VERSION) | 245 | rm -fr $(NAME)-$(VERSION) |
@@ -258,5 +259,9 @@ cppcheck: clean | |||
258 | 259 | ||
259 | scan-build: clean | 260 | scan-build: clean |
260 | scan-build make | 261 | scan-build make |
262 | |||
261 | asc:; ./mkasc.sh $(VERSION) | 263 | asc:; ./mkasc.sh $(VERSION) |
262 | 264 | ||
265 | test-profiles: | ||
266 | cd test/profiles; ./profiles.sh | grep TESTING | ||
267 | |||
diff --git a/test/profile_syntax.exp b/test/profiles/profile_syntax.exp index 559947276..ecad1043b 100755 --- a/test/profile_syntax.exp +++ b/test/profiles/profile_syntax.exp | |||
@@ -1,4 +1,7 @@ | |||
1 | #!/usr/bin/expect -f | 1 | #!/usr/bin/expect -f |
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2016 Firejail Authors | ||
4 | # License GPL v2 | ||
2 | 5 | ||
3 | set timeout 10 | 6 | set timeout 10 |
4 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
diff --git a/test/profile_syntax2.exp b/test/profiles/profile_syntax2.exp index 96e85ba93..ba83731be 100755 --- a/test/profile_syntax2.exp +++ b/test/profiles/profile_syntax2.exp | |||
@@ -1,4 +1,7 @@ | |||
1 | #!/usr/bin/expect -f | 1 | #!/usr/bin/expect -f |
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2016 Firejail Authors | ||
4 | # License GPL v2 | ||
2 | 5 | ||
3 | set timeout 10 | 6 | set timeout 10 |
4 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
diff --git a/test/profiles/profiles.sh b/test/profiles/profiles.sh new file mode 100755 index 000000000..ea1f51c1a --- /dev/null +++ b/test/profiles/profiles.sh | |||
@@ -0,0 +1,19 @@ | |||
1 | #!/bin/bash | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2016 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | echo "TESTING: default profiles installed in /etc" | ||
7 | PROFILES=`ls /etc/firejail/*.profile` | ||
8 | for PROFILE in $PROFILES | ||
9 | do | ||
10 | echo "TESTING: $PROFILE" | ||
11 | ./test-profile.exp $PROFILE | ||
12 | done | ||
13 | |||
14 | echo "TESTING: profile syntax (profiles/profile_syntax.exp)" | ||
15 | ./profile_syntax.exp | ||
16 | |||
17 | echo "TESTING: profile syntax 2 (profiles/profile_syntax2.exp)" | ||
18 | ./profile_syntax2.exp | ||
19 | |||
diff --git a/test/test-profile.exp b/test/profiles/test-profile.exp index a03e8db31..590b42652 100755 --- a/test/test-profile.exp +++ b/test/profiles/test-profile.exp | |||
@@ -1,4 +1,7 @@ | |||
1 | #!/usr/bin/expect -f | 1 | #!/usr/bin/expect -f |
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2016 Firejail Authors | ||
4 | # License GPL v2 | ||
2 | 5 | ||
3 | set timeout 10 | 6 | set timeout 10 |
4 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
diff --git a/test/test.profile b/test/profiles/test.profile index 1d69cc960..1d69cc960 100644 --- a/test/test.profile +++ b/test/profiles/test.profile | |||
diff --git a/test/test2.profile b/test/profiles/test2.profile index d7e1a1f21..d7e1a1f21 100644 --- a/test/test2.profile +++ b/test/profiles/test2.profile | |||
diff --git a/test/test-profiles.sh b/test/test-profiles.sh deleted file mode 100755 index d9142885b..000000000 --- a/test/test-profiles.sh +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | echo "TESTING: default profiles installed in /etc" | ||
4 | PROFILES=`ls /etc/firejail/*.profile` | ||
5 | for PROFILE in $PROFILES | ||
6 | do | ||
7 | echo "TESTING: $PROFILE" | ||
8 | ./test-profile.exp $PROFILE | ||
9 | done | ||
10 | |||
diff --git a/test/test.sh b/test/test.sh index 961b48807..0fa26d86d 100755 --- a/test/test.sh +++ b/test/test.sh | |||
@@ -2,8 +2,6 @@ | |||
2 | 2 | ||
3 | ./chk_config.exp | 3 | ./chk_config.exp |
4 | 4 | ||
5 | ./test-profiles.sh | ||
6 | |||
7 | ./fscheck.sh | 5 | ./fscheck.sh |
8 | 6 | ||
9 | echo "TESTING: cpu.print (cpu-print.exp)" | 7 | echo "TESTING: cpu.print (cpu-print.exp)" |
@@ -220,12 +218,6 @@ echo "TESTING: output (output.exp)" | |||
220 | echo "TESTING: profile no permissions (profile_noperm.exp)" | 218 | echo "TESTING: profile no permissions (profile_noperm.exp)" |
221 | ./profile_noperm.exp | 219 | ./profile_noperm.exp |
222 | 220 | ||
223 | echo "TESTING: profile syntax (profile_syntax.exp)" | ||
224 | ./profile_syntax.exp | ||
225 | |||
226 | echo "TESTING: profile syntax 2 (profile_syntax2.exp)" | ||
227 | ./profile_syntax2.exp | ||
228 | |||
229 | echo "TESTING: profile rlimit (profile_rlimit.exp)" | 221 | echo "TESTING: profile rlimit (profile_rlimit.exp)" |
230 | ./profile_rlimit.exp | 222 | ./profile_rlimit.exp |
231 | 223 | ||