Enforce sorting on the collect exclude directories

Updates "tox -e linters" to call "tox -e sorted"
so that zuul will enforce sorting of a particular file.

This adds a sort enforcement for the collect directories
The sort check runs: 'LC_ALL=c sort -c'

Note:  LC_ALL=c is required so that different environments
such as Ubuntu and Debian will validate using the same sort
ordering.

Story: 2010531
Task: 47379
Signed-off-by: Al Bailey <al.bailey@windriver.com>
Change-Id: I739de1b43bf88ebef5da0890026827bd9599bc6f
This commit is contained in:
Al Bailey 2022-12-20 17:44:28 +00:00
parent bb3b8cd46a
commit 21ce83869a
2 changed files with 22 additions and 15 deletions

View File

@ -1,17 +1,17 @@
/var/run/.vswitch
/var/run/acpid.socket
/var/run/avahi-daemon
/var/run/containerd
/var/run/dbus/system_bus_socket
/var/run/libvirt/libvirt-sock
/var/run/libvirt/libvirt-sock-ro
/var/run/named-chroot
/var/run/neutron/metadata_proxy
/var/run/nvidia
/var/run/ostree_repo
/var/run/rpc_pipefs
/var/run/rpcbind.sock
/var/run/sanlock/sanlock.sock
/var/run/systemd/inaccessible/blk
/var/run/tgtd.ipc_abstract_namespace.0
/var/run/wdmd/wdmd.sock
/var/run/acpid.socket
/var/run/rpcbind.sock
/var/run/libvirt/libvirt-sock-ro
/var/run/libvirt/libvirt-sock
/var/run/dbus/system_bus_socket
/var/run/named-chroot
/var/run/avahi-daemon
/var/run/neutron/metadata_proxy
/var/run/.vswitch
/var/run/containerd
/var/run/nvidia
/var/run/rpc_pipefs
/var/run/systemd/inaccessible/blk
/var/run/ostree_repo

View File

@ -10,7 +10,6 @@ sitepackages = False
basepython = python3.9
install_command = pip install \
-v -v -v \
-U \
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt} \
{opts} {packages}
setenv =
@ -24,6 +23,7 @@ deps =
-r{toxinidir}/test-requirements.txt
allowlist_externals =
bash
sort
[testenv:bashate]
# Treat all E* codes as Errors rather than warnings using: -e 'E*'
@ -101,10 +101,17 @@ commands = pylint {posargs} \
utilities/platform-util/platform-util/platform_util \
--rcfile=./pylint.rc
[testenv:sorted]
# sort acts differently on Ubuntu and Debian
# LC_ALL=c ensures they sort the same way
setenv =
LC_ALL=c
commands = sort -c tools/collector/debian-scripts/run.exclude
[testenv:linters]
commands =
{[testenv:bashate]commands}
{[testenv:sorted]commands}
[testenv:bandit]
basepython = python3