From: | Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com> |
---|---|
To: | Daniel Gustafsson <daniel(at)yesql(dot)se> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_upgrade: Make testing different transfer modes easier |
Date: | 2022-12-07 16:33:06 |
Message-ID: | ea5105c4-725d-d37c-e5c7-86926f9ea54a@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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';
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2022-12-07 16:59:09 | Re: Error-safe user functions |
Previous Message | Peter Eisentraut | 2022-12-07 16:30:44 | Re: pg_upgrade: Make testing different transfer modes easier |