---
name: "dh_pgxs_test"
section: "1"
platform: "linux"
package: "postgresql-common-dev"
version: "278"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/dh_pgxs_test"
---

# dh\_pgxs\_test(1)

Run testsuite during a PGXS PostgreSQL extension build

## NAME

dh\_pgxs\_test - Run testsuite during a PGXS PostgreSQL extension build

## SYNOPSIS

**dh\_pgxs\_test** \[**loop**\]

## DESCRIPTION

**PostgreSQL** extensions need to be installed before they can be tested and hence the usual **debhelper** way of invoking tests from [**dh\_auto\_test**(1)](/dh_auto_test/1.md) does not work.

**dh\_pgxs\_test** is a [**dh**(1)](/dh/1.md) sequence point created by the **pgxs** and **pgxs\_loop** **debhelper** extensions that is executed after [**dh\_auto\_install**(1)](/dh_auto_install/1.md). It calls **pg\_buildext installcheck** after a **PostgreSQL** extension module has been built and installed into the `debian/`*packagename/* directory.

Users wishing to change the action called by **dh\_pgxs\_test** should call **pg\_buildext** or similar commands.

```
  override_dh_pgxs_test:
          echo "CREATE EXTENSION foo" | pg_buildext psql . . postgresql-%v-foo
```

## OPTIONS

- **loop**

  **dh --with pgxs** builds packages in `build-%v` subdirectories. The **loop** options corresponds to **dh --with pgxs\_loop** and builds in the top-level directory.

## SEE ALSO

[**debhelper**(7)](/debhelper/7.md), [**dh**(1)](/dh/1.md), [**dh\_make\_pgxs**(1)](/dh_make_pgxs/1.md), [**pg\_buildext**(1)](/pg_buildext/1.md).

## AUTHOR

Christoph Berg \<myon@debian.org\>
