From 4a2041b38e9bce9fb3970779c82dc30812fdded7 Mon Sep 17 00:00:00 2001 From: Tomas Hozza Date: Fri, 17 Dec 2021 10:11:14 +0100 Subject: [PATCH] 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 --- tools/test-case-generators/generate-all-test-cases | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/test-case-generators/generate-all-test-cases b/tools/test-case-generators/generate-all-test-cases index c52adc3c1..145350099 100755 --- a/tools/test-case-generators/generate-all-test-cases +++ b/tools/test-case-generators/generate-all-test-cases @@ -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')")