2021-05-18 19:30:57 +00:00
|
|
|
#!/bin/sh
|
|
|
|
set -eux
|
|
|
|
|
|
|
|
# tests need cockpit's bots/ libraries and test infrastructure
|
|
|
|
cd $SOURCE
|
|
|
|
git init
|
|
|
|
make bots test/common
|
|
|
|
|
2021-07-01 15:55:56 +00:00
|
|
|
|
|
|
|
# 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
|
|
|
|
mv package.json .package.json
|
|
|
|
npm install chrome-remote-interface sizzle
|
|
|
|
mv .package.json package.json
|
|
|
|
fi
|
2021-05-18 19:30:57 +00:00
|
|
|
|
|
|
|
. /etc/os-release
|
|
|
|
export TEST_OS="${ID}-${VERSION_ID/./-}"
|
|
|
|
export TEST_AUDIT_NO_SELINUX=1
|
|
|
|
|
|
|
|
RC=0
|
|
|
|
test/check-application -tv --machine 127.0.0.1:22 --browser 127.0.0.1:9090 || RC=$?
|
|
|
|
|
|
|
|
echo $RC > "$LOGS/exitcode"
|
|
|
|
cp --verbose Test* "$LOGS" || true
|
|
|
|
# deliver test result via exitcode file
|
|
|
|
exit 0
|