[OS-BUILD PATCH 1/3] redhat/self-test: Add purpose and header to each test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Prarit Bhargava <prarit@xxxxxxxxxx>

redhat/self-test: Add purpose and header to each test

Add a purpose and bats env header to each test.

Signed-off-by: Prarit Bhargava <prarit@xxxxxxxxxx>

diff --git a/redhat/self-test/0001-shellcheck.bats b/redhat/self-test/0001-shellcheck.bats
index blahblah..blahblah 100644
--- a/redhat/self-test/0001-shellcheck.bats
+++ b/redhat/self-test/0001-shellcheck.bats
@@ -1,3 +1,6 @@
+#!/usr/bin/env bats
+# Purpose: This test runs shellcheck on all .sh files in the redhat directory.
+
 @test "shellcheck" {
     if ! test -x /usr/bin/shellcheck
     then
diff --git a/redhat/self-test/1001-rpmlint.bats b/redhat/self-test/1001-rpmlint.bats
index blahblah..blahblah 100644
--- a/redhat/self-test/1001-rpmlint.bats
+++ b/redhat/self-test/1001-rpmlint.bats
@@ -1,4 +1,6 @@
 #!/usr/bin/env bats
+# Purpose: This test runs rpmlint on the source rpm.
+
 @test "rpmlint" {
     if ! test -x /usr/bin/rpmlint
     then
diff --git a/redhat/self-test/1002-basic-structural-test.bats b/redhat/self-test/1002-basic-structural-test.bats
index blahblah..blahblah 100644
--- a/redhat/self-test/1002-basic-structural-test.bats
+++ b/redhat/self-test/1002-basic-structural-test.bats
@@ -1,4 +1,6 @@
 #!/usr/bin/env bats
+# Purpose: This test runs tests on the SRPM.
+
 @test "SRPM unpacks OK" {
     numsrpms=$(find "$BATS_TEST_DIRNAME"/.. -name "*.rpm" | wc -l)
     if [ "$numsrpms" != "1" ]; then
diff --git a/redhat/self-test/1003-rpminspect.bats b/redhat/self-test/1003-rpminspect.bats
index blahblah..blahblah 100644
--- a/redhat/self-test/1003-rpminspect.bats
+++ b/redhat/self-test/1003-rpminspect.bats
@@ -1,4 +1,6 @@
 #!/usr/bin/env bats
+# Purpose: This test runs rpminspect on the SRPM.
+
 @test "rpminspect" {
     if ! test -x /usr/bin/rpminspect
     then
diff --git a/redhat/self-test/1005-dist-dump-variables.bats b/redhat/self-test/1005-dist-dump-variables.bats
index blahblah..blahblah 100644
--- a/redhat/self-test/1005-dist-dump-variables.bats
+++ b/redhat/self-test/1005-dist-dump-variables.bats
@@ -1,4 +1,7 @@
 #!/usr/bin/env bats
+# Purpose: This test creates a set of Makefile variables, and a set of
+# variables that are used in the specfile.  This data is diff'd against a
+# "known good" set of data and if there is a difference an error is reported.
 
 @test "self-test-data check" {
 	mkdir -p $BATS_TMPDIR/data
diff --git a/redhat/self-test/1006-verify-SPEC-variables.bats b/redhat/self-test/1006-verify-SPEC-variables.bats
index blahblah..blahblah 100644
--- a/redhat/self-test/1006-verify-SPEC-variables.bats
+++ b/redhat/self-test/1006-verify-SPEC-variables.bats
@@ -1,8 +1,8 @@
 #!/usr/bin/env bats
+# Purpose: This test looks at the spec file variable replacement code in
+# redhat/genspec.sh and confirms that each variable begins with "SPEC".
 
 @test "verify SPEC variables" {
-# This test looks at the spec file variable replacement code in
-# redhat/genspec.sh and confirms that each variable begins with "SPEC".
 
 # This looks at the code and replaces each / with a new-line character, removes
 # any whitespace and entry entries beginning with valid "%%SPEC" or $"SPEC".
diff --git a/redhat/self-test/2001-dist-release.bats b/redhat/self-test/2001-dist-release.bats
index blahblah..blahblah 100644
--- a/redhat/self-test/2001-dist-release.bats
+++ b/redhat/self-test/2001-dist-release.bats
@@ -1,4 +1,6 @@
 #!/usr/bin/env bats
+# Purpose: These are general dist-release tests.  They are run from a git
+# worktree created by the first test.
 
 @test "dist-release prologue" {
     git worktree add $BATS_TMPDIR/distrelease
diff --git a/redhat/self-test/3001-Makefile-contents.bats b/redhat/self-test/3001-Makefile-contents.bats
index blahblah..blahblah 100755
--- a/redhat/self-test/3001-Makefile-contents.bats
+++ b/redhat/self-test/3001-Makefile-contents.bats
@@ -1,4 +1,6 @@
 #!/usr/bin/env bats
+# Purpose: This is a test that verifies that Makefile.variable variable
+# declarations are all declared with "?="
 
 @test "Makefile variable declarations" {
 	# By design, only the Makefile.variables file should have ?= declarations

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1881
_______________________________________________
kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux