From: Prarit Bhargava <[email protected]>

create-data.sh: Reduce specfile data output

One of the self-tests, 1005-dist-dump-variables.bats, runs a comparison
against a known good specfile and compares it to a spec file generated
against the latest tree.  This test currently compares the entire
specfile.  As a consequence if anyone changes anything in the specfile the
test data needs to be regenerated, even if the change does not involve
modifications of the Makefile variables.

Modify the output to only look at the results of the Makefile variables
that are passed into the specfile.

Signed-off-by: Prarit Bhargava <[email protected]>

diff --git a/redhat/self-test/data/create-data.sh 
b/redhat/self-test/data/create-data.sh
index blahblah..blahblah 100755
--- a/redhat/self-test/data/create-data.sh
+++ b/redhat/self-test/data/create-data.sh
@@ -54,7 +54,7 @@ do
 
                        echo "building ${varfilename}.spec"
                        make RHSELFTESTDATA=1 DIST="${DIST}" DISTRO="${DISTRO}" 
HEAD=${commit} setup-source
-                       cp "$specfile" "${varfilename}".spec
+                        grep -Fvx -f "./kernel.spec.template" "$specfile" > 
"${varfilename}".spec
                done
        done
 done

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

Reply via email to