This will allow us to control the value from test plans, in particular for disabling at least some unexpected message checks for reverse dependency testing. We don't want to disable unexpected messages in general for fmf, as we are looking for exactly these in e.g. selinux-policy reverse dependency tests. Move from `su` to `runtest`, as with the former it's impossible to plumb through variables with non-trivial characters, as they cannot be quoted. Taken fromc38692fa4c(cherry picked from commit9544f57220)
42 lines
1.2 KiB
Bash
Executable file
42 lines
1.2 KiB
Bash
Executable file
#!/bin/sh
|
|
set -eux
|
|
|
|
# tests need cockpit's bots/ libraries and test infrastructure
|
|
cd $SOURCE
|
|
git init
|
|
rm -f bots # common local case: existing bots symlink
|
|
make bots test/common
|
|
|
|
# support running from clean git tree
|
|
if [ ! -d node_modules/chrome-remote-interface ]; then
|
|
# copy package.json temporarily otherwise npm might try to install the dependencies from it
|
|
rm -f package-lock.json # otherwise the command below installs *everything*, argh
|
|
mv package.json .package.json
|
|
# only install a subset to save time/space
|
|
npm install chrome-remote-interface sizzle
|
|
mv .package.json package.json
|
|
fi
|
|
|
|
# disable detection of affected tests; testing takes too long as there is no parallelization
|
|
mv .git dot-git
|
|
|
|
. /etc/os-release
|
|
export TEST_OS="${ID}-${VERSION_ID/./-}"
|
|
|
|
if [ "${TEST_OS#centos-}" != "$TEST_OS" ]; then
|
|
TEST_OS="${TEST_OS}-stream"
|
|
fi
|
|
|
|
EXCLUDES=""
|
|
|
|
# make it easy to check in logs
|
|
echo "TEST_ALLOW_JOURNAL_MESSAGES: ${TEST_ALLOW_JOURNAL_MESSAGES:-}"
|
|
echo "TEST_AUDIT_NO_SELINUX: ${TEST_AUDIT_NO_SELINUX:-}"
|
|
|
|
RC=0
|
|
test/common/run-tests --nondestructive --machine 127.0.0.1:22 --browser 127.0.0.1:9090 $EXCLUDES || RC=$?
|
|
|
|
echo $RC > "$LOGS/exitcode"
|
|
cp --verbose Test* "$LOGS" || true
|
|
# deliver test result via exitcode file
|
|
exit 0
|