From 502b9bbd908ef724f1fa64e29ceb3d430907b9c0 Mon Sep 17 00:00:00 2001 From: netblue30 Date: Sun, 10 Jul 2022 11:07:46 -0400 Subject: testing fix --- test/profiles/all-profiles.sh | 47 +++++++++++++++++++++++++++++++++++++++++++ test/profiles/profiles.sh | 11 ++-------- 2 files changed, 49 insertions(+), 9 deletions(-) create mode 100755 test/profiles/all-profiles.sh (limited to 'test') diff --git a/test/profiles/all-profiles.sh b/test/profiles/all-profiles.sh new file mode 100755 index 000000000..cc17b6b00 --- /dev/null +++ b/test/profiles/all-profiles.sh @@ -0,0 +1,47 @@ +#!/bin/bash +# This file is part of Firejail project +# Copyright (C) 2014-2022 Firejail Authors +# License GPL v2 + +export MALLOC_CHECK_=3 +export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) +export LC_ALL=C + +echo "TESTING: profile comments (test/profiles/profilecomment.exp)" +./profile_comment.exp + +echo "TESTING: profile conditional (test/profiles/conditional.exp)" +./conditional.exp + +echo "TESTING: profile recursivity (test/profiles/profile_recursivity.exp)" +./profile_recursivity.exp + +echo "TESTING: profile application name (test/profiles/profile_appname.exp)" +./profile_appname.exp + +echo "TESTING: profile syntax (test/profiles/profile_syntax.exp)" +./profile_syntax.exp + +echo "TESTING: profile syntax 2 (test/profiles/profile_syntax2.exp)" +./profile_syntax2.exp + +echo "TESTING: ignore command (test/profiles/ignore.exp)" +./ignore.exp + +echo "TESTING: profile read-only (test/profiles/profile_readonly.exp)" +./profile_readonly.exp + +echo "TESTING: profile read-only links (test/profiles/profile_readonly.exp)" +./profile_followlnk.exp + +echo "TESTING: profile no permissions (test/profiles/profile_noperm.exp)" +./profile_noperm.exp + +PROFILES=`ls /etc/firejail/*.profile` +echo "TESTING: default profiles installed in /etc" + +for PROFILE in $PROFILES +do + echo "TESTING: $PROFILE" + ./test-profile.exp $PROFILE +done diff --git a/test/profiles/profiles.sh b/test/profiles/profiles.sh index ce2fa32c4..8808bc9d2 100755 --- a/test/profiles/profiles.sh +++ b/test/profiles/profiles.sh @@ -37,15 +37,8 @@ echo "TESTING: profile read-only links (test/profiles/profile_readonly.exp)" echo "TESTING: profile no permissions (test/profiles/profile_noperm.exp)" ./profile_noperm.exp -# GitHub CI doesn't have a /run/user/$UID directory. Using it to test a small number of profiles. -UID=`id -u` -if [ -d "/run/user/$UID" ]; then - PROFILES=`ls /etc/firejail/*.profile` - echo "TESTING: default profiles installed in /etc" -else - PROFILES=`ls /etc/firejail/transmission*.profile /etc/firejail/fi*.profile /etc/firejail/fl*.profile /etc/firejail/free*.profile` - echo "TESTING: small number of default profiles installed in /etc" -fi +PROFILES=`ls /etc/firejail/transmission*.profile /etc/firejail/fi*.profile /etc/firejail/fl*.profile /etc/firejail/free*.profile` +echo "TESTING: small number of default profiles installed in /etc" for PROFILE in $PROFILES do -- cgit v1.2.3-54-g00ecf