1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00

Add verify-ports presubmit.

This commit is contained in:
Jonas 'Sortie' Termansen 2022-07-09 20:40:37 +02:00
parent 86f6cdb718
commit 802b0ef1d1
3 changed files with 23 additions and 1 deletions

View file

@ -585,6 +585,7 @@ release: release-arch release-shared
# Presubmit checks
presubmit:
$(MAKE) verify-ports
$(MAKE) verify-coding-style
$(MAKE) verify-manual
$(MAKE) verify-build-tools
@ -598,6 +599,9 @@ endif
$(MAKE) verify-headers
@echo ok
verify-ports:
build-aux/verify-ports.sh
verify-coding-style:
build-aux/verify-coding-style.sh

16
build-aux/verify-ports.sh Executable file
View file

@ -0,0 +1,16 @@
#!/bin/sh
# Verifies the port(5) files.
set -e
for port in ports/*/*.port; do \
tix-vars -t "$port"
NAME=$(tix-vars "$port" NAME)
if [ "$port" != "ports/$NAME/$NAME.port" ]; then
echo "error: $port should be ports/$NAME/$NAME.port"
exit 1
fi
DEVELOPMENT=$(tix-vars -d unset "$port" DEVELOPMENT)
if [ "$DEVELOPMENT" != unset ]; then
echo "error: $port: DEVELOPMENT should be not be set"
exit 1
fi
done

View file

@ -132,7 +132,9 @@ a remote mirror.
Clean everything except binary packages and the mirror of upstream releases.
.Sy ( clean-builds , clean-ports , clean-release , clean-sysroot , distclean-ports )
.It Sy presubmit
Verify the coding style is followed
Verify the port configuration
.Sy ( verify-ports ) ,
the coding style is followed
.Sy ( verify-coding-style ) ,
the manual pages does not have lints
.Sy ( verify-manual ) ,