cockpit-podman/tests/run-test.sh
Martin Pitt 8253a95498 test: Avoid npm install downloading everything
In the presence of a package-lock.json, `npm install` apparently
downloads all packages even when giving explicit ones on the CLI. Avoid
that by removing package-lock.json before.
2020-08-06 10:50:51 +02:00

25 lines
701 B
Bash
Executable File

#!/bin/sh
set -eux
# tests need cockpit's bots/ libraries and test infrastructure
cd $SOURCE
git init
make bots test/common
# only install a subset to save time/space
rm -f package-lock.json # otherwise the command below installs *everything*, argh
npm install chrome-remote-interface sizzle
. /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 \
TestApplication.test{BasicSystem,BasicUser,DownloadImage,LifecycleOperationsUser,LifecycleOperationsSystem} || RC=$?
echo $RC > "$LOGS/exitcode"
cp --verbose Test* "$LOGS" || true
# deliver test result via exitcode file
exit 0