2015-06-10 20:59:55 +00:00
|
|
|
#
|
|
|
|
# Makefile for subiquity
|
|
|
|
#
|
2015-06-25 21:49:29 +00:00
|
|
|
PYTHONSRC=subiquity
|
2015-06-30 16:52:31 +00:00
|
|
|
PYTHONPATH=$(shell pwd):$(shell pwd)/probert:$PYTHONPATH
|
|
|
|
VENVPATH=$(shell pwd)/venv
|
|
|
|
VENVACTIVATE=$(VENVPATH)/bin/activate
|
|
|
|
TOPDIR=$(shell pwd)
|
2015-06-15 19:12:26 +00:00
|
|
|
STREAM=daily
|
|
|
|
RELEASE=wily
|
|
|
|
ARCH=amd64
|
2015-07-22 00:06:58 +00:00
|
|
|
BOOTLOADER=grub2
|
2015-06-15 19:12:26 +00:00
|
|
|
INSTALLIMG=ubuntu-server-${STREAM}-${RELEASE}-${ARCH}-installer.img
|
2015-06-17 20:36:32 +00:00
|
|
|
INSTALLER_RESOURCES += $(shell find installer/resources -type f)
|
|
|
|
.PHONY: run clean
|
|
|
|
|
2015-07-06 15:55:49 +00:00
|
|
|
all: dryrun
|
|
|
|
|
|
|
|
dryrun:
|
|
|
|
$(MAKE) ui-view DRYRUN="--dry-run"
|
2015-06-10 20:59:55 +00:00
|
|
|
|
2015-06-30 20:08:42 +00:00
|
|
|
ui-view:
|
2015-07-06 19:34:26 +00:00
|
|
|
(PYTHONPATH=$(PYTHONPATH) bin/$(PYTHONSRC) $(DRYRUN))
|
2015-06-25 21:49:29 +00:00
|
|
|
|
2015-06-30 21:53:12 +00:00
|
|
|
ui-view-serial:
|
2015-07-06 15:55:49 +00:00
|
|
|
(TERM=att4424 PYTHONPATH=$(PYTHONPATH) bin/$(PYTHONSRC) $(DRYRUN) --serial)
|
2015-06-30 21:53:12 +00:00
|
|
|
|
2015-06-25 21:49:29 +00:00
|
|
|
lint:
|
|
|
|
echo "Running flake8 lint tests..."
|
|
|
|
flake8 bin/$(PYTHONSRC) --ignore=F403
|
|
|
|
flake8 --exclude $(PYTHONSRC)/tests/ $(PYTHONSRC) --ignore=F403
|
|
|
|
|
|
|
|
unit:
|
|
|
|
echo "Running unit tests..."
|
|
|
|
python3 -m "nose" -v --nologcapture --with-coverage $(PYTHONSRC)/tests/
|
2015-06-15 19:12:26 +00:00
|
|
|
|
2015-06-17 20:36:32 +00:00
|
|
|
installer/$(INSTALLIMG): installer/geninstaller installer/runinstaller $(INSTALLER_RESOURCES)
|
2015-07-22 00:06:58 +00:00
|
|
|
(cd installer && ./geninstaller -v -r $(RELEASE) -a $(ARCH) -s $(STREAM) -b $(BOOTLOADER))
|
2015-06-17 20:36:32 +00:00
|
|
|
echo $(INSTALLER_RESOURCES)
|
|
|
|
|
|
|
|
installer: installer/$(INSTALLIMG)
|
2015-06-15 19:12:26 +00:00
|
|
|
|
|
|
|
run: installer
|
|
|
|
(cd installer && INSTALLER=$(INSTALLIMG) ./runinstaller)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f installer/target.img
|
|
|
|
rm -f installer/installer.img
|
|
|
|
rm -f installer/geninstaller.log
|
|
|
|
find installer -type f -name *-installer.img | xargs -i rm {}
|