From: Vitaly Kuznetsov <vkuzn...@redhat.com>

redhat: Add dist-check-licenses target

Introduce a dedicated make target to check source code licenses without
the need to run all other selftests which may be failing for some other
reason.

Signed-off-by: Vitaly Kuznetsov <vkuzn...@redhat.com>

diff --git a/redhat/Makefile b/redhat/Makefile
index blahblah..blahblah 100644
--- a/redhat/Makefile
+++ b/redhat/Makefile
@@ -877,6 +877,13 @@ dist-self-test:
 dist-self-test-data:
        ./self-test/data/create-data.sh
 
+dist-check-licenses:
+       @if test -x /usr/bin/bats; then \
+               bats $(REDHAT)/self-test/1007-spdx-licenses.bats ; \
+       else \
+               echo "dist-check-licenses: The bats package is not installed" ; 
\
+       fi
+
 dist-help:
        @echo  'Cleaning targets:'
        @echo  '  dist-clean          - Clean redhat/configs/ and redhat/rpm/ 
directories.'
@@ -1000,6 +1007,9 @@ dist-full-help:
        @echo  '  dist-os-version - Displays the current Red Hat Enterprise 
Linux versioni'
        @echo  '                    target used by the current branch/tree.'
        @echo  '  dist-self-test  - Runs self-tests from the redhat/self-test 
directory'
+       @echo  '  dist-check-licenses - Runs license selftest checking 
SPDX-License-Identifier:'
+       @echo  '                        tags in all source files against 
`License:` field in the'
+       @echo  '                        specfile template.'
        @echo  ''
 
 export

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2648
_______________________________________________
kernel mailing list -- kernel@lists.fedoraproject.org
To unsubscribe send an email to kernel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to