generate-all-test-cases: use make scratch for building RPMs

Use `make scratch` for building RPMs without tests. This fixes the case,
when the RPM build with test fails to build due to changes in image
manifests. The whole reason of running the script is to regenerate image
test cases when the manifest changed, so this was a chicken and egg
problem.

No CI testing is needed, as this is a development tool.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
This commit is contained in:
Tomas Hozza 2021-12-17 10:11:14 +01:00 committed by Thomas Lavocat
parent 68410e0a4c
commit 4a2041b38e

View file

@ -932,7 +932,11 @@ class BaseTestCaseMatrixGenerator(contextlib.AbstractContextManager):
runner.dnf_install(["'@RPM Development Tools'"])
runner.run_command_check_call(f"{enter_src_dir} sudo dnf -y builddep *.spec")
runner.run_command_check_call(f"{enter_src_dir} make rpm")
# Build RPMs without tests to prevent failing the unit test that checks
# image manifests. Since we are regenerating image test cases, it is
# assumed that the unit test would not pass until the respective tests
# are regenerated.
runner.run_command_check_call(f"{enter_src_dir} make scratch")
# do not install debuginfo and debugsource RPMs
runner.run_command_check_call(f"{enter_src_dir} sudo dnf install -y $(ls rpmbuild/RPMS/*/*.rpm | grep -Ev 'debugsource|debuginfo')")