diff --git a/cargo-pgrx/src/command/regress.rs b/cargo-pgrx/src/command/regress.rs index 369ca03cd..fc1f1f6f9 100644 --- a/cargo-pgrx/src/command/regress.rs +++ b/cargo-pgrx/src/command/regress.rs @@ -98,6 +98,10 @@ pub(crate) struct Regress { /// Run the test suite this many times (default: 1) #[clap(long, default_value_t = 1, value_name = "N")] pub(crate) repeat: u32, + + /// Run Postgres under valgrind while executing the regression tests + #[clap(long)] + pub(crate) valgrind: bool, } impl Regress { diff --git a/cargo-pgrx/src/command/run.rs b/cargo-pgrx/src/command/run.rs index 014dfb5ef..7e83975d2 100644 --- a/cargo-pgrx/src/command/run.rs +++ b/cargo-pgrx/src/command/run.rs @@ -72,7 +72,7 @@ impl From<&Regress> for Run { verbose: regress.verbose, pgcli: false, install_only: false, - valgrind: false, + valgrind: regress.valgrind, } } }