Re: pg_upgrade: Make testing different transfer modes easier
От | Peter Eisentraut |
---|---|
Тема | Re: pg_upgrade: Make testing different transfer modes easier |
Дата | |
Msg-id | ea5105c4-725d-d37c-e5c7-86926f9ea54a@enterprisedb.com обсуждение исходный текст |
Ответ на | Re: pg_upgrade: Make testing different transfer modes easier (Daniel Gustafsson <daniel@yesql.se>) |
Ответы |
Re: pg_upgrade: Make testing different transfer modes easier
|
Список | pgsql-hackers |
On 02.12.22 13:04, Daniel Gustafsson wrote: > Wouldn't it be possible, and less change-code-manual, to accept this via an > extension to PROVE_FLAGS? Any options after :: to prove are passed to the > test(s) [0] so we could perhaps inspect @ARGV for the mode if we invent a new > way to pass arguments. Something along the lines of the untested sketch > below in the pg_upgrade test: > > +# Optionally set the file transfer mode for the tests via arguments to PROVE > +my $mode = (@ARGV); > +$mode = '--copy' unless defined; > > .. together with an extension to Makefile.global.in .. > > - $(PROVE) $(PG_PROVE_FLAGS) $(PROVE_FLAGS) $(if $(PROVE_TESTS),$(PROVE_TESTS),t/*.pl) > + $(PROVE) $(PG_PROVE_FLAGS) $(PROVE_FLAGS) $(if $(PROVE_TESTS),$(PROVE_TESTS),t/*.pl) $(PROVE_TEST_ARGS) > > .. should *I think* allow for passing the mode to the tests via: > > make -C src/bin/pg_upgrade check PROVE_TEST_ARGS=":: --link" I think this might be a lot of complication to get working robustly and in the different build systems. Plus, what happens if you run all the test suites and want to pass some options to pg_upgrade and some to another test? I think if we want to make this configurable on the fly, and environment variable would be much easier, like my $mode = $ENV{PG_TEST_PG_UPGRADE_MODE} || '--copy';
В списке pgsql-hackers по дате отправления: