Re: Add support for PROVE_FLAGS and PROVE_TESTS in MSVC scripts

From: Juan José Santamaría Flecha <juanjo(dot)santamaria(at)gmail(dot)com>
To: Julien Rouhaud <rjuju123(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Add support for PROVE_FLAGS and PROVE_TESTS in MSVC scripts
Date: 2021-03-03 19:59:30
Message-ID: CAC+AXB2HOorRizUMG5O1Sx=DgnFP_MjC7pXE8GkDPOccbOe95w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Mar 3, 2021 at 11:25 AM Julien Rouhaud <rjuju123(at)gmail(dot)com> wrote:

> On Wed, Mar 03, 2021 at 05:19:22PM +0900, Michael Paquier wrote:
> >
> > Each time I do development on Windows, I get annoyed by the fact that
> > it is not easy to run individual test scripts in the same way as we do
> > on any other platforms, using PROVE_TESTS, or even PROVE_FLAGS. And
> > there have been recent complaints about not being able to do that.
> >
> > Please find attached a patch to support both variables, with some
> > documentation. Using a terminal on Windows, one can set those
> > variables using just.. "set", say:
> > set PROVE_FLAGS=--timer
> > set PROVE_TESTS=t/020*.pl t/010*.pl
> >
> > Note the absence of quotes for the second one, so as it is possible to
> > apply cleanly glob() to each element passed down.
> >
> > Thoughts?
>
> +1, I heavily rely on that and I can imagine how hard it's to develop a
> patch
> on windows without it.
>
> Patch LGTM, althouth I don't have any Windows environnment to test it.
>

+1 for the functionality. I have tested it and works as expected in my
environment (Windows 10 + VS 2019).

Just a comment about the documentation:

+ <para>
+ The TAP tests run with <command>vcregress</command> support the
+ environment variables <varname>PROVE_TESTS</varname>, that is expanded
+ automatically using the name patterns given, and
+ <varname>PROVE_FLAGS</varname>. These can for instance be set
+ on a Windows terminal as follows, before running
+ <command>vcregress</command>:
+<programlisting>
+set PROVE_FLAGS=--timer
+set PROVE_TESTS=t/020*.pl t/010*.pl
+</programlisting>
+ </para>

This seems to me as if setting the variables in the shell is the proposed
way to do so. In the previous doc point we do the same with the buildenv.pl
file. It looks inconsistent, as if it was one way or the other, when it
could be either.

Regards,

Juan José Santamaría Flecha

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2021-03-03 20:15:41 Re: simplifying foreign key/RI checks
Previous Message Peter Eisentraut 2021-03-03 19:43:20 Re: Extensibility of the PostgreSQL wire protocol