interlace monolithic and modular to catch errors in modular w/o going through all monolithic tests first
This commit is contained in:
parent
1f8a8bbbbd
commit
959fca6669
@ -1,58 +1,45 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
DISTROS="redhat gentoo debian suse"
|
#DISTROS="redhat gentoo debian suse"
|
||||||
|
DISTROS="redhat"
|
||||||
TYPES="strict strict-mls strict-mcs targeted targeted-mls targeted-mcs"
|
TYPES="strict strict-mls strict-mcs targeted targeted-mls targeted-mcs"
|
||||||
POLVER="`checkpolicy -V |cut -f 1 -d ' '`"
|
POLVER="`checkpolicy -V |cut -f 1 -d ' '`"
|
||||||
SETFILES="/usr/sbin/setfiles"
|
SETFILES="/usr/sbin/setfiles"
|
||||||
SE_LINK="/usr/bin/semodule_link"
|
SE_LINK="/usr/bin/semodule_link"
|
||||||
|
|
||||||
do_monolithic_test() {
|
do_test() {
|
||||||
local OPTS=""
|
local OPTS=""
|
||||||
|
|
||||||
for i in $TYPES; do
|
for i in $TYPES; do
|
||||||
|
# Monolithic tests
|
||||||
OPTS="TYPE=$i QUIET=@ DIRECT_INITRC=y"
|
OPTS="TYPE=$i QUIET=@ DIRECT_INITRC=y"
|
||||||
[ ! -z "$1" ] && OPTS="$OPTS DISTRO=$1"
|
[ ! -z "$1" ] && OPTS="$OPTS DISTRO=$1"
|
||||||
make $OPTS bare || exit 1
|
|
||||||
echo "**** Options: $OPTS ****"
|
echo "**** Options: $OPTS ****"
|
||||||
make $OPTS conf || exit 1
|
make $OPTS conf || exit 1
|
||||||
make $OPTS || exit 1
|
make $OPTS || exit 1
|
||||||
make $OPTS file_contexts || exit 1
|
make $OPTS file_contexts || exit 1
|
||||||
$SETFILES -q -c policy.$POLVER file_contexts || exit 1
|
$SETFILES -q -c policy.$POLVER file_contexts || exit 1
|
||||||
make $OPTS bare || exit 1
|
make $OPTS bare || exit 1
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
do_modular_test() {
|
# Loadable module tests
|
||||||
local OPTS=""
|
|
||||||
|
|
||||||
for i in $TYPES; do
|
|
||||||
OPTS="TYPE=$i MONOLITHIC=n QUIET=@ DIRECT_INITRC=y"
|
OPTS="TYPE=$i MONOLITHIC=n QUIET=@ DIRECT_INITRC=y"
|
||||||
[ ! -z "$1" ] && OPTS="$OPTS DISTRO=$1"
|
[ ! -z "$1" ] && OPTS="$OPTS DISTRO=$1"
|
||||||
make $OPTS bare || exit 1
|
|
||||||
echo "**** Options: $OPTS ****"
|
echo "**** Options: $OPTS ****"
|
||||||
make $OPTS conf || exit 1
|
make $OPTS conf || exit 1
|
||||||
make $OPTS || exit 1
|
make $OPTS all || exit 1
|
||||||
make $OPTS base modules || exit 1
|
|
||||||
mv base.pp tmp
|
mv base.pp tmp
|
||||||
$SE_LINK tmp/base.pp *.pp || exit 1
|
$SE_LINK tmp/base.pp *.pp || exit 1
|
||||||
make $OPTS bare || exit 1
|
make $OPTS bare || exit 1
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
# Monolithic tests
|
make bare || exit 1
|
||||||
|
make MONOLITHIC=n bare || exit 1
|
||||||
|
|
||||||
do_monolithic_test
|
do_test
|
||||||
|
|
||||||
for i in $DISTROS; do
|
for i in $DISTROS; do
|
||||||
do_monolithic_test $i
|
do_test $i
|
||||||
done
|
|
||||||
|
|
||||||
# Loadable module tests
|
|
||||||
|
|
||||||
do_modular_test
|
|
||||||
|
|
||||||
for i in $DISTROS; do
|
|
||||||
do_modular_test $i
|
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Completed successfully."
|
echo "Completed successfully."
|
||||||
|
Loading…
Reference in New Issue
Block a user