parent
c99c9e2d38
commit
931e1be3c3
7 changed files with 102 additions and 1 deletions
28
Makefile
28
Makefile
|
|
@ -1,4 +1,9 @@
|
|||
PACKAGE_NAME := $(shell python3 -c "import json; print(json.load(open('package.json'))['name'])")
|
||||
ifeq ($(TEST_OS),)
|
||||
TEST_OS = centos-7
|
||||
endif
|
||||
export TEST_OS
|
||||
VM_IMAGE=$(CURDIR)/test/images/$(TEST_OS)
|
||||
|
||||
all: node_modules/react-lite
|
||||
NODE_ENV=$(NODE_ENV) npm run build
|
||||
|
|
@ -41,7 +46,28 @@ rpm: dist-gzip
|
|||
rm -r "`pwd`/rpmbuild"
|
||||
rm -r "`pwd`/output" "`pwd`/build"
|
||||
|
||||
# build a VM with locally built cockpit-starter-kit.rpm installed
|
||||
$(VM_IMAGE): rpm bots
|
||||
bots/image-customize -v -r 'rpm -e cockpit-starter-kit || true' -i cockpit -i `pwd`/cockpit-starter-kit-*.noarch.rpm -s $(CURDIR)/test/vm.install $(TEST_OS)
|
||||
|
||||
# run the browser integration tests; skip check for SELinux denials
|
||||
check: node_modules/react-lite $(VM_IMAGE) test/common
|
||||
TEST_AUDIT_NO_SELINUX=1 test/check-starter-kit
|
||||
|
||||
# checkout Cockpit's bots/ directory for standard test VM images and API to launch them
|
||||
bots:
|
||||
git fetch --depth=1 https://github.com/cockpit-project/cockpit.git
|
||||
git checkout --force FETCH_HEAD -- bots/
|
||||
git reset bots
|
||||
|
||||
# checkout Cockpit's test API
|
||||
test/common:
|
||||
# when running in CI, update FETCH_HEAD to cockpit repo
|
||||
if git remote | grep -qF test; then git fetch origin master; fi
|
||||
git checkout --force FETCH_HEAD -- test/common
|
||||
git reset test/common
|
||||
|
||||
node_modules/react-lite:
|
||||
npm install
|
||||
|
||||
.PHONY: all clean install install-only dist-gzip srpm rpm
|
||||
.PHONY: all clean install install-only dist-gzip srpm rpm check
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue