Commit 6bef6626 authored by Gabe Alford's avatar Gabe Alford

Add pylint to Makefile and CI run

parent 433e126a
......@@ -2,9 +2,10 @@ Fedora-latest:
# When building CI for a particular system, adapt the image
image: fedora:latest
before_script:
- dnf install --nogpgcheck -y openssh-clients openssh-server openssl git which gnutls-utils java-1.8.0-openjdk-devel bind perl asciidoc perl-generators libxslt 'perl(File::pushd)' 'perl(File::Temp)' 'perl(File::Copy)' libreswan dracut diffutils
- dnf install --nogpgcheck -y openssh-clients openssh-server openssl git which gnutls-utils java-1.8.0-openjdk-devel bind perl asciidoc perl-generators libxslt 'perl(File::pushd)' 'perl(File::Temp)' 'perl(File::Copy)' libreswan dracut diffutils python3-pylint
script:
- pushd tests && git clone --depth 1 https://github.com/frozencemetery/krb5check && popd
- make runpylint
- make && make check
- make install && make test-install >test-install.log 2>&1 && make test-fips-setup >test-fips-setup.log 2>&1
tags:
......
......@@ -7,6 +7,8 @@ DESTDIR?=
MAN7PAGES=crypto-policies.7
MAN8PAGES=update-crypto-policies.8 fips-finish-install.8 fips-mode-setup.8
SCRIPTS=update-crypto-policies fips-finish-install fips-mode-setup
NUM_PROCS = $$(getconf _NPROCESSORS_ONLN)
PYVERSION = -3
all: build
......@@ -31,7 +33,11 @@ install: $(MANPAGES)
chmod 755 $(DESTDIR)$(DIR)/python/update-crypto-policies.py
chmod 755 $(DESTDIR)$(DIR)/python/build-crypto-policies.py
check:
runpylint:
@find . -name '*.py' -print|xargs -n1 --max-procs=$(NUM_PROCS) pylint$(PYVERSION) -s no 2> /dev/null
@echo "[ OK ]"
check: runpylint
python/build-crypto-policies.py --test --flat policies tests/outputs
python/build-crypto-policies.py --policy FIPS:OSPP --test --flat policies tests/outputs
python/build-crypto-policies.py --policy FIPS:ECDHE-ONLY --test --flat policies tests/outputs
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment