From: Prarit Bhargava prarit@redhat.com
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 prarit@redhat.com
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