build: add support for /pybridge scenario
Build the Python bridge from the cockpit project and install it into the VM so we can run tests against it.
This commit is contained in:
parent
030d64ba48
commit
03d02f398a
2 changed files with 21 additions and 2 deletions
20
Makefile
20
Makefile
|
|
@ -154,10 +154,28 @@ rpm: $(TARFILE) $(NODE_CACHE) $(SPEC)
|
||||||
rm -r "`pwd`/rpmbuild"
|
rm -r "`pwd`/rpmbuild"
|
||||||
rm -r "`pwd`/output" "`pwd`/build"
|
rm -r "`pwd`/output" "`pwd`/build"
|
||||||
|
|
||||||
|
ifeq ("$(TEST_SCENARIO)","pybridge")
|
||||||
|
COCKPIT_PYBRIDGE_REF = main
|
||||||
|
COCKPIT_WHEEL = cockpit-0-py3-none-any.whl
|
||||||
|
|
||||||
|
$(COCKPIT_WHEEL):
|
||||||
|
# aka: pip wheel git+https://github.com/cockpit-project/cockpit.git@${COCKPIT_PYBRIDGE_REF}
|
||||||
|
rm -rf tmp/pybridge
|
||||||
|
git init tmp/pybridge
|
||||||
|
git -C tmp/pybridge remote add origin https://github.com/cockpit-project/cockpit
|
||||||
|
git -C tmp/pybridge fetch --depth=1 origin ${COCKPIT_PYBRIDGE_REF}
|
||||||
|
git -C tmp/pybridge reset --hard FETCH_HEAD
|
||||||
|
cp "$$(tmp/pybridge/tools/make-wheel)" $@
|
||||||
|
|
||||||
|
VM_DEPENDS = $(COCKPIT_WHEEL)
|
||||||
|
VM_CUSTOMIZE_FLAGS = --install $(COCKPIT_WHEEL)
|
||||||
|
endif
|
||||||
|
|
||||||
# build a VM with locally built distro pkgs installed
|
# build a VM with locally built distro pkgs installed
|
||||||
# disable networking, VM images have mock/pbuilder with the common build dependencies pre-installed
|
# disable networking, VM images have mock/pbuilder with the common build dependencies pre-installed
|
||||||
$(VM_IMAGE): $(TARFILE) $(NODE_CACHE) bots test/vm.install
|
$(VM_IMAGE): $(TARFILE) $(NODE_CACHE) bots test/vm.install $(VM_DEPENDS)
|
||||||
bots/image-customize --no-network --fresh \
|
bots/image-customize --no-network --fresh \
|
||||||
|
$(VM_CUSTOMIZE_FLAGS) \
|
||||||
--upload $(NODE_CACHE):/var/tmp/ --build $(TARFILE) \
|
--upload $(NODE_CACHE):/var/tmp/ --build $(TARFILE) \
|
||||||
--script $(CURDIR)/test/vm.install $(TEST_OS)
|
--script $(CURDIR)/test/vm.install $(TEST_OS)
|
||||||
|
|
||||||
|
|
|
||||||
3
test/run
3
test/run
|
|
@ -4,6 +4,7 @@ set -eu
|
||||||
# This is the expected entry point for Cockpit CI; will be called without
|
# This is the expected entry point for Cockpit CI; will be called without
|
||||||
# arguments but with an appropriate $TEST_OS, and optionally $TEST_SCENARIO
|
# arguments but with an appropriate $TEST_OS, and optionally $TEST_SCENARIO
|
||||||
|
|
||||||
[ -z "${TEST_SCENARIO:-}" ] || export TEST_BROWSER="$TEST_SCENARIO"
|
TEST_SCENARIO="${TEST_SCENARIO:-}"
|
||||||
|
[ "${TEST_SCENARIO}" = "${TEST_SCENARIO##firefox}" ] || export TEST_BROWSER=firefox
|
||||||
export RUN_TESTS_OPTIONS=--track-naughties
|
export RUN_TESTS_OPTIONS=--track-naughties
|
||||||
make check
|
make check
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue