subiquity/Makefile

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

120 lines
2.8 KiB
Makefile
Raw Normal View History

#
# Makefile for subiquity
#
NAME=subiquity
PYTHONSRC=$(NAME)
PYTHONPATH=$(shell pwd):$(shell pwd)/probert:$(shell pwd)/curtin
PROBERTDIR=./probert
PROBERT_REPO=https://github.com/canonical/probert
DRYRUN?=--dry-run --bootloader uefi --machine-config examples/machines/simple.json \
--source-catalog examples/sources/install.yaml \
--postinst-hooks-dir examples/postinst.d/
SYSTEM_SETUP_DRYRUN?=--dry-run
export PYTHONPATH
2018-05-21 19:00:41 +00:00
CWD := $(shell pwd)
CHECK_DIRS := console_conf subiquity subiquitycore system_setup
PYTHON := python3
ifneq (,$(MACHINE))
MACHARGS=--machine=$(MACHINE)
endif
.PHONY: all
all: dryrun
.PHONY: aptdeps
aptdeps:
sudo apt update && \
sudo apt-get install -y $(shell cat apt-deps.txt)
2018-02-14 22:40:50 +00:00
.PHONY: install_deps
install_deps: aptdeps gitdeps
.PHONY: i18n
2018-02-14 22:40:50 +00:00
i18n:
2020-03-10 12:00:13 +00:00
$(PYTHON) setup.py build_i18n
cd po; intltool-update -r -g subiquity
2018-02-14 22:40:50 +00:00
.PHONY: dryrun ui-view
dryrun ui-view: probert i18n
$(PYTHON) -m subiquity $(DRYRUN) $(MACHARGS)
.PHONY: dryrun-console-conf ui-view-console-conf
dryrun-console-conf ui-view-console-conf:
$(PYTHON) -m console_conf.cmd.tui --dry-run $(MACHARGS)
.PHONY: dryrun-serial ui-view-serial
dryrun-serial ui-view-serial:
(TERM=att4424 $(PYTHON) -m subiquity $(DRYRUN) --serial)
.PHONY: dryrun-server
dryrun-server:
$(PYTHON) -m subiquity.cmd.server $(DRYRUN)
.PHONY: dryrun-system-setup
dryrun-system-setup:
$(PYTHON) -m system_setup.cmd.tui $(SYSTEM_SETUP_DRYRUN)
.PHONY: dryrun-system-setup-server
dryrun-system-setup-server:
$(PYTHON) -m system_setup.cmd.server $(SYSTEM_SETUP_DRYRUN)
.PHONY: dryrun-system-setup-recon
2021-07-22 16:49:12 +00:00
dryrun-system-setup-recon:
DRYRUN_RECONFIG=true $(PYTHON) -m system_setup.cmd.tui $(SYSTEM_SETUP_DRYRUN)
2021-07-22 16:49:12 +00:00
.PHONY: dryrun-system-setup-server-recon
2021-07-22 16:49:12 +00:00
dryrun-system-setup-server-recon:
DRYRUN_RECONFIG=true $(PYTHON) -m system_setup.cmd.server $(SYSTEM_SETUP_DRYRUN)
2021-07-22 16:49:12 +00:00
.PHONY: lint
lint: flake8
2018-05-21 19:52:38 +00:00
.PHONY: flake8
flake8:
$(PYTHON) -m flake8 $(CHECK_DIRS)
.PHONY: unit
unit: gitdeps
timeout 120 \
$(PYTHON) -m pytest --ignore curtin --ignore probert \
2021-09-27 20:34:18 +00:00
--ignore subiquity/tests/api
.PHONY: api
2021-12-01 18:55:44 +00:00
api: gitdeps
$(PYTHON) -m pytest -n auto subiquity/tests/api
.PHONY: integration
integration: gitdeps
echo "Running integration tests..."
./scripts/runtests.sh
.PHONY: check
2021-09-27 20:34:18 +00:00
check: unit integration api
curtin: snapcraft.yaml
./scripts/update-part.py curtin
probert: snapcraft.yaml
./scripts/update-part.py probert
(cd probert && $(PYTHON) setup.py build_ext -i);
.PHONY: gitdeps
gitdeps: curtin probert
.PHONY: schema
schema: gitdeps
@$(PYTHON) -m subiquity.cmd.schema > autoinstall-schema.json
@$(PYTHON) -m system_setup.cmd.schema > autoinstall-system-setup-schema.json
2023-07-21 20:21:04 +00:00
.PHONY: format black isort
format:
env -u PYTHONPATH tox -e black,isort
black isort:
env -u PYTHONPATH tox -e $@
.PHONY: clean
clean:
./debian/rules clean