Expand properly list of TAP tests used for prove in vcregress.pl
authorMichael Paquier <[email protected]>
Wed, 11 Sep 2019 02:07:44 +0000 (11:07 +0900)
committerMichael Paquier <[email protected]>
Wed, 11 Sep 2019 02:07:44 +0000 (11:07 +0900)
Depending on the system used, t/*.pl may not be expanded into a list of
tests which can be consumed by prove when attempting to run TAP tests on
a given path.  Fix that by using glob() directly in the script, to make
sure that a complete list of tests is provided.  This has not proved to
be an issue with MSVC as the list was properly expanded, but it is on
Linux with perl's system().

This is extracted from a larger patch.

Author: Tom Lane
Discussion: https://postgr.es/m/6628.1567958876@sss.pgh.pa.us
Backpatch-through: 9.4

src/tools/msvc/vcregress.pl

index 2274d5fafd5f06e96b3d8c07b170c4689693af77..31d064f26fbb6d5e992c055a59f57ba9c790edb6 100644 (file)
@@ -199,7 +199,7 @@ sub tap_check
    my $dir = shift;
    chdir $dir;
 
-   my @args = ("prove", @flags, "t/*.pl");
+   my @args = ("prove", @flags, glob("t/*.pl"));
 
    # adjust the environment for just this test
    local %ENV = %ENV;