|
273 | 273 | end
|
274 | 274 | end
|
275 | 275 |
|
| 276 | + # Check that any JLL stdlib that defines executables also provides corresponding *_path variables |
| 277 | + @testset "Stdlib JLL executable path variables" begin |
| 278 | + for (_, (stdlib_name, _)) in Pkg.Types.stdlibs() |
| 279 | + if !endswith(stdlib_name, "_jll") |
| 280 | + continue |
| 281 | + end |
| 282 | + |
| 283 | + # Import the stdlib, skip it if it's not available on this platform |
| 284 | + m = eval(Meta.parse("import $(stdlib_name); $(stdlib_name)")) |
| 285 | + if !Base.invokelatest(getproperty(m, :is_available)) |
| 286 | + continue |
| 287 | + end |
| 288 | + |
| 289 | + # Look for *_exe constants that indicate executable definitions |
| 290 | + exe_constants = Symbol[] |
| 291 | + for name in names(m, all=true) |
| 292 | + name_str = string(name) |
| 293 | + if endswith(name_str, "_exe") && isdefined(m, name) |
| 294 | + push!(exe_constants, name) |
| 295 | + end |
| 296 | + end |
| 297 | + |
| 298 | + # For each *_exe constant, check if there's a corresponding *_path variable |
| 299 | + for exe_const in exe_constants |
| 300 | + exe_name_str = string(exe_const) |
| 301 | + # Convert from *_exe to *_path (e.g., zstd_exe -> zstd_path) |
| 302 | + expected_path_var = Symbol(replace(exe_name_str, "_exe" => "_path")) |
| 303 | + |
| 304 | + @test isdefined(m, expected_path_var) |
| 305 | + |
| 306 | + if !isdefined(m, expected_path_var) |
| 307 | + @warn("Missing path variable", |
| 308 | + jll = stdlib_name, |
| 309 | + exe_constant = exe_const, |
| 310 | + expected_path_var = expected_path_var |
| 311 | + ) |
| 312 | + end |
| 313 | + end |
| 314 | + end |
| 315 | + end |
| 316 | + |
276 | 317 | finally
|
277 | 318 | if prev_env !== nothing
|
278 | 319 | Pkg.activate(prev_env)
|
|
0 commit comments