fmf: Dependency installation robustification
Sync some improvements from cockpit-machines: * Unbreak running `tmt` in local trees with an already existing ./bots symlink. * Don't install all NPM packages, only chrome-remote-interface and sizzle. * Disable detection of affected tests, taking too long for real projects.
This commit is contained in:
parent
0bc01714ee
commit
5d15bdac5c
1 changed files with 13 additions and 3 deletions
|
|
@ -4,11 +4,21 @@ set -eux
|
||||||
# tests need cockpit's bots/ libraries and test infrastructure
|
# tests need cockpit's bots/ libraries and test infrastructure
|
||||||
cd $SOURCE
|
cd $SOURCE
|
||||||
git init
|
git init
|
||||||
|
rm -f bots # common local case: existing bots symlink
|
||||||
make bots test/common
|
make bots test/common
|
||||||
|
|
||||||
# only install a subset to save time/space
|
# 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
|
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
|
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
|
. /etc/os-release
|
||||||
export TEST_OS="${ID}-${VERSION_ID/./-}"
|
export TEST_OS="${ID}-${VERSION_ID/./-}"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue