selinux-refpolicy/tools/regression.sh

35 lines
718 B
Bash
Raw Normal View History

2005-08-17 15:12:43 +00:00
#!/bin/bash
DISTROS="redhat gentoo debian suse"
2005-09-21 14:49:41 +00:00
TYPES="strict strict-mls strict-mcs targeted targeted-mls targeted-mcs"
2005-08-17 15:12:43 +00:00
POLVER="`checkpolicy -V |cut -f 1 -d ' '`"
SETFILES="/usr/sbin/setfiles"
do_test() {
local OPTS=""
2005-09-21 14:49:41 +00:00
for i in $TYPES; do
OPTS="TYPE=$i QUIET=@ DIRECT_INITRC=y"
2005-08-17 15:12:43 +00:00
[ ! -z "$1" ] && OPTS="$OPTS DISTRO=$1"
make bare || exit 1
echo "**** Options: $OPTS ****"
2005-12-07 16:42:33 +00:00
echo -ne "\33]0;$i $1\007"
2005-08-17 15:12:43 +00:00
make $OPTS conf || exit 1
make $OPTS || exit 1
make $OPTS file_contexts || exit 1
$SETFILES -q -c policy.$POLVER file_contexts || exit 1
done
}
# first to generic test
do_test
# now distro-specitic test
for i in $DISTROS; do
do_test $i
done
# clean up
make bare
echo "Completed successfully."