Skip to content

cargo pgrx regress fails on Windows. All tests output "The system cannot find the path specified". #2237

@willibrandon

Description

@willibrandon

Reproduction:

cargo pgrx regress pg18

All tests fail with "The system cannot find the path specified".

Observation: Running pg_regress directly with --bindir="" works:

pg_regress.exe --bindir="" --host localhost --port 28818 --use-existing --dbname=myext_regress --inputdir=... --outputdir=... test1 test2

All tests pass.

Relevant code in cargo-pgrx/src/command/regress.rs - the pg_regress function does not pass --bindir:

let mut command = Command::new(bin);
command
    .current_dir(test_dir)
    .env_remove("PGDATABASE")
    .env_remove("PGHOST")
    .env_remove("PGPORT")
    .env_remove("PGUSER")
    .stdout(Stdio::piped())
    .stderr(Stdio::piped())
    .arg("--host")
    .arg(pg_config.host())
    .arg("--port")
    .arg(pg_config.port()?.to_string())
    .arg("--use-existing")
    .arg(format!("--dbname={dbname}"))
    .arg(format!("--inputdir={}", input_dir.display()))
    .arg(format!("--outputdir={}", input_dir.display()))
    .args(tests);

Am I missing something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions