代码拉取完成,页面将自动刷新
同步操作将从 openEuler/nestos-assembler 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
PREFIX ?= /usr
DESTDIR ?=
# E128 continuation line under-indented for visual indent
# E241 multiple spaces after ','
# E402 module level import not at top of file
# E501 line too long
# E722 do not use bare 'except'
# W503 line break before binary operator
# W504 line break after binary operator
PYIGNORE ?= E128,E241,E402,E501,E722,W503,W504
.PHONY: all check flake8 pycheck unittest clean mantle mantle-check install
MANTLE_BINARIES := ore kola plume
all: mantle
src:=$(shell find src -maxdepth 1 -type f -executable -print)
pysources=$(shell find src -type f -name '*.py') $(shell for x in $(src); do if head -1 $$x | grep -q python; then echo $$x; fi; done)
src_checked:=$(patsubst src/%,src/.%.shellchecked,${src})
tests:=$(shell find tests -maxdepth 1 -type f -executable -print)
tests_checked:=$(patsubst tests/%,tests/.%.shellchecked,${tests})
cwd:=$(shell find . -maxdepth 1 -type f -executable -print)
cwd_checked:=$(patsubst ./%,.%.shellchecked,${cwd})
GOARCH:=$(shell uname -m)
export COSA_META_SCHEMA:=$(shell pwd)/src/v1.json
ifeq ($(GOARCH),x86_64)
GOARCH="amd64"
else ifeq ($(GOARCH),aarch64)
GOARCH="arm64"
endif
.%.shellchecked: %
./tests/check_one.sh $< $@
check: ${src_checked} ${tests_checked} ${cwd_checked} flake8 pycheck mantle-check
echo OK
pycheck:
python3 -m py_compile $(pysources)
pylint -E $(pysources)
flake8:
python3 -m flake8 --ignore=$(PYIGNORE) $(pysources)
# The following lines will verify python files that are not modules
# but are commented out as the files are not ready for checking yet
# grep -r "^\#\!/usr/bin/py" src/ | cut -d : -f 1 | xargs flake8 --ignore=$(PYIGNORE)
# find src -maxdepth 1 -name "*.py" | xargs flake8 --ignore=$(PYIGNORE)
unittest:
COSA_TEST_META_PATH=`pwd`/fixtures \
PYTHONPATH=`pwd`/src python3 -m pytest tests/
clean:
rm -f ${src_checked} ${tests_checked} ${cwd_checked}
find . -name "*.py[co]" -type f | xargs rm -f
find . -name "__pycache__" -type d | xargs rm -rf
mantle:
cd mantle && $(MAKE)
.PHONY: $(MANTLE_BINARIES) kolet
$(MANTLE_BINARIES) kolet:
cd mantle && $(MAKE) $@
mantle-check:
cd mantle && $(MAKE) test
.PHONY: schema
schema:
$(MAKE) -C schema
install:
install -d $(DESTDIR)$(PREFIX)/lib/coreos-assembler
install -D -t $(DESTDIR)$(PREFIX)/lib/coreos-assembler $$(find src/ -maxdepth 1 -type f)
cp -df -t $(DESTDIR)$(PREFIX)/lib/coreos-assembler $$(find src/ -maxdepth 1 -type l)
install -d $(DESTDIR)$(PREFIX)/lib/coreos-assembler/cosalib
install -D -t $(DESTDIR)$(PREFIX)/lib/coreos-assembler/cosalib $$(find src/cosalib/ -maxdepth 1 -type f)
install -d $(DESTDIR)$(PREFIX)/bin
ln -sf ../lib/coreos-assembler/coreos-assembler $(DESTDIR)$(PREFIX)/bin/
ln -sf ../lib/coreos-assembler/cp-reflink $(DESTDIR)$(PREFIX)/bin/
ln -sf coreos-assembler $(DESTDIR)$(PREFIX)/bin/cosa
install -d $(DESTDIR)$(PREFIX)/lib/coreos-assembler/tests/kola
cd mantle && $(MAKE) install DESTDIR=$(DESTDIR)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。