From 305ba3f74bbf407dc7275f48da520b9af297f4a8 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Aug 10 2020 22:23:11 +0000 Subject: Swap PERL5OPT patch for one submitted upstream Not doing a build as this doesn't really change anything. --- diff --git a/0001-Revert-Use-relative-path-in-test-with-database-targe.patch b/0001-Revert-Use-relative-path-in-test-with-database-targe.patch deleted file mode 100644 index 39c7be8..0000000 --- a/0001-Revert-Use-relative-path-in-test-with-database-targe.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 1f9c2623b4f76a34581c0525db4e185bb1a6f497 Mon Sep 17 00:00:00 2001 -From: Adam Williamson -Date: Wed, 5 Aug 2020 14:35:48 -0700 -Subject: [PATCH] Revert "Use relative path in test-with-database target so it - works easier within Docker" - -This reverts commit 6cc4cbe6bbf6f14aca6ab912a98ee48e3e6a1bae. It -breaks the tests in Fedora's build environment, for some reason. ---- - Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile b/Makefile -index a0acd14e9..aac1470b0 100644 ---- a/Makefile -+++ b/Makefile -@@ -164,7 +164,7 @@ test-developer: - .PHONY: test-with-database - test-with-database: - test -d $(TEST_PG_PATH) && (pg_ctl -D $(TEST_PG_PATH) -s status >&/dev/null || pg_ctl -D $(TEST_PG_PATH) -s start) || ./t/test_postgresql $(TEST_PG_PATH) -- PERL5OPT="$(PERL5OPT) -It/lib -MOpenQA::Test::PatchDeparse" $(MAKE) test-unit-and-integration TEST_PG="DBI:Pg:dbname=openqa_test;host=$(TEST_PG_PATH)" -+ PERL5OPT="$(PERL5OPT) -I$(PWD)/t/lib -MOpenQA::Test::PatchDeparse" $(MAKE) test-unit-and-integration TEST_PG="DBI:Pg:dbname=openqa_test;host=$(TEST_PG_PATH)" - -[ $(KEEP_DB) = 1 ] || pg_ctl -D $(TEST_PG_PATH) stop - - .PHONY: test-unit-and-integration --- -2.28.0 - diff --git a/0001-make-test-with-database-add-I-PWD-t-lib-back-to-PERL.patch b/0001-make-test-with-database-add-I-PWD-t-lib-back-to-PERL.patch new file mode 100644 index 0000000..bda0cda --- /dev/null +++ b/0001-make-test-with-database-add-I-PWD-t-lib-back-to-PERL.patch @@ -0,0 +1,38 @@ +From afa9b11bf9a96588111405b379de8c655b02a189 Mon Sep 17 00:00:00 2001 +From: Adam Williamson +Date: Mon, 10 Aug 2020 14:50:07 -0700 +Subject: [PATCH] `make test-with-database`: add -I$(PWD)/t/lib back to + PERL5OPT + +As discussed in https://github.com/os-autoinst/openQA/pull/3194 +while changing `-I$(PWD)/t/lib` to `-It/lib` made things work in +Docker, it broke them in Fedora's build system. We really don't +know why and it's a bit of a mystery, but it seems easier to just +have both than try and figure out the causes. + +Signed-off-by: Adam Williamson +--- + Makefile | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index a0acd14e9..d2880e2a8 100644 +--- a/Makefile ++++ b/Makefile +@@ -161,10 +161,12 @@ test-scheduler: + test-developer: + $(MAKE) test-with-database DEVELOPER_FULLSTACK=1 TIMEOUT_M=10 PROVE_ARGS="$$HARNESS t/33-developer_mode.t" RETRY=3 + ++# we have apparently-redundant -I args in PERL5OPT here because Docker ++# only works with one and Fedora's build system only works with the other + .PHONY: test-with-database + test-with-database: + test -d $(TEST_PG_PATH) && (pg_ctl -D $(TEST_PG_PATH) -s status >&/dev/null || pg_ctl -D $(TEST_PG_PATH) -s start) || ./t/test_postgresql $(TEST_PG_PATH) +- PERL5OPT="$(PERL5OPT) -It/lib -MOpenQA::Test::PatchDeparse" $(MAKE) test-unit-and-integration TEST_PG="DBI:Pg:dbname=openqa_test;host=$(TEST_PG_PATH)" ++ PERL5OPT="$(PERL5OPT) -It/lib -I$(PWD)/t/lib -MOpenQA::Test::PatchDeparse" $(MAKE) test-unit-and-integration TEST_PG="DBI:Pg:dbname=openqa_test;host=$(TEST_PG_PATH)" + -[ $(KEEP_DB) = 1 ] || pg_ctl -D $(TEST_PG_PATH) stop + + .PHONY: test-unit-and-integration +-- +2.28.0 + diff --git a/openqa.spec b/openqa.spec index 2b3b196..be06dac 100644 --- a/openqa.spec +++ b/openqa.spec @@ -108,9 +108,9 @@ Source3: FedoraMessaging.pm # tests for the fedora-messaging publishing plugin Source4: 23-fedora-messaging.t -# Revert a Makefile change that breaks the tests in Fedora build env: -# https://github.com/os-autoinst/openQA/pull/3194#issuecomment-669524419 -Patch0: 0001-Revert-Use-relative-path-in-test-with-database-targe.patch +# Fix a weird perl lib path issues that breaks the tests in Fedora build env +# https://github.com/os-autoinst/openQA/pull/3302 +Patch0: 0001-make-test-with-database-add-I-PWD-t-lib-back-to-PERL.patch BuildRequires: %{python_scripts_requires} BuildRequires: perl-generators