forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit0826ac8
committed
Improve setup of environment values for commands in MSVC's vcregress.pl
The current setup assumes that commands for lz4, zstd and gzip alwaysexist by default if not enforced by a user's environment. However,vcpkg, as one example, installs libraries but no binaries, so thisdefault setup to assume that a command should always be present wouldcause failures. This commit improves the detection of such externalcommands as follows:* If a ENV value is available, trust the environment/user and use it.* If a ENV value is not available, check its execution by looking in thecurrent PATH, by launching a simple "$command --version" (that should beportable enough).** On execution failure, ignore ENV{command}.** On execution success, set ENV{command} = "$command".Note that this new rule applies to gzip, lz4 and zstd but not tar thatwe assume will always exist. Those commands are set up in theenvironment only when using bincheck and taptest. The CI includes allthose commands and I have checked that their setup is correct there. Ihave also tested this change in a MSVC environment where we have none ofthose commands.While on it, remove the references to lz4 from the documentation andvcregress.pl in ~v13. --with-lz4 has been added in v14~ so there is nopoint to have this information in these older branches.Reported-by: Andrew DunstanReviewed-by: Andrew DunstanDiscussion:https://postgr.es/m/14402151-376b-a57a-6d0c-10ad12608e12@dunslane.netBackpatch-through: 101 parentc90c165 commit0826ac8
1 file changed
+39
-4
lines changedLines changed: 39 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
| 17 | + | |
17 | 18 |
| |
18 | 19 |
| |
19 | 20 |
| |
| |||
30 | 31 |
| |
31 | 32 |
| |
32 | 33 |
| |
| 34 | + | |
| 35 | + | |
33 | 36 |
| |
34 |
| - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
35 | 40 |
| |
36 |
| - | |
37 |
| - | |
38 | 41 |
| |
39 |
| - | |
40 | 42 |
| |
41 | 43 |
| |
42 | 44 |
| |
| |||
119 | 121 |
| |
120 | 122 |
| |
121 | 123 |
| |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
122 | 152 |
| |
123 | 153 |
| |
124 | 154 |
| |
| |||
276 | 306 |
| |
277 | 307 |
| |
278 | 308 |
| |
| 309 | + | |
| 310 | + | |
279 | 311 |
| |
280 | 312 |
| |
281 | 313 |
| |
| |||
310 | 342 |
| |
311 | 343 |
| |
312 | 344 |
| |
| 345 | + | |
| 346 | + | |
| 347 | + | |
313 | 348 |
| |
314 | 349 |
| |
315 | 350 |
| |
|
0 commit comments
Comments
(0)