You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-12-23 23:51:07 +02:00
Update contributing guide to Ubuntu 22.04.
20.04 is EOL and Docker is now noisy during installation so update.
This commit is contained in:
@@ -26,7 +26,7 @@ Coding standards are defined in [CODING.md](https://github.com/pgbackrest/pgback
|
||||
|
||||
## Building a Development Environment
|
||||
|
||||
This example is based on Ubuntu 20.04, but it should work on many versions of Debian and Ubuntu.
|
||||
This example is based on Ubuntu 22.04, but it should work on many versions of Debian and Ubuntu.
|
||||
|
||||
pgbackrest-dev => Install development tools
|
||||
```
|
||||
@@ -339,34 +339,34 @@ pgbackrest/test/test.pl --module=postgres
|
||||
|
||||
#### With Docker
|
||||
|
||||
Build a container to run tests. The vm must be pre-configured but a variety are available. A vagrant file is provided in the test directory as an example of running in a virtual environment. The vm names are all three character abbreviations, e.g. `u20` for Ubuntu 20.04.
|
||||
Build a container to run tests. The vm must be pre-configured but a variety are available. A vagrant file is provided in the test directory as an example of running in a virtual environment. The vm names are all three character abbreviations, e.g. `u22` for Ubuntu 22.04.
|
||||
|
||||
pgbackrest-dev => Build a VM
|
||||
```
|
||||
pgbackrest/test/test.pl --vm-build --vm=u20
|
||||
pgbackrest/test/test.pl --vm-build --vm=u22
|
||||
|
||||
--- output ---
|
||||
|
||||
P00 INFO: test begin on x86_64 - log level info
|
||||
P00 INFO: Using cached pgbackrest/test:u20-base-x86_64-20250228A image (862159b4d2169a4752b106639ca0f47c1ebb1f86) ...
|
||||
P00 INFO: Building pgbackrest/test:u20-test-x86_64 image ...
|
||||
P00 INFO: Building pgbackrest/test:u22-base-aarch64 image (8feb0a70d1614b6873887e0bb3d99ef7016663eb) ...
|
||||
P00 INFO: Building pgbackrest/test:u22-test-aarch64 image ...
|
||||
P00 INFO: Build Complete
|
||||
```
|
||||
> **NOTE:** to build all the vms, just omit the `--vm` option above.
|
||||
|
||||
pgbackrest-dev => Run a Specific Test Run
|
||||
```
|
||||
pgbackrest/test/test.pl --vm=u20 --module=postgres --test=interface --run=2
|
||||
pgbackrest/test/test.pl --vm=u22 --module=postgres --test=interface --run=2
|
||||
|
||||
--- output ---
|
||||
|
||||
P00 INFO: test begin on x86_64 - log level info
|
||||
P00 INFO: cleanup old data and containers
|
||||
P00 INFO: autogenerate code
|
||||
P00 INFO: clean build for u20 (/home/vagrant/test/build/u20)
|
||||
P00 INFO: clean build for u22 (/home/vagrant/test/build/u22)
|
||||
P00 INFO: 1 test selected
|
||||
|
||||
P00 INFO: P1-T1/1 - vm=u20, module=postgres, test=interface, run=2
|
||||
P00 INFO: P1-T1/1 - vm=u22, module=postgres, test=interface, run=2
|
||||
P00 INFO: TESTS COMPLETED SUCCESSFULLY
|
||||
```
|
||||
|
||||
@@ -521,7 +521,7 @@ TEST_ERROR(cmdCheck(), ConfigError, "primary database not found\nHINT: check ind
|
||||
|
||||
Unit tests are run for all files that are listed in `define.yaml` and a coverage report generated for each file listed under the tag `coverage:`. Note that some files are listed in multiple `coverage:` sections for a module; in this case, each test for the file being modified should be specified for the module in which the file exists (e.g. `--module=storage --test=posix --test=gcs`, etc.) or, alternatively, simply run the module without the `--test` option. It is recommended that a `--vm` be specified since running the same test for multiple vms is unnecessary for coverage. The following example would run the test set from the **define.yaml** section detailed above.
|
||||
```
|
||||
pgbackrest/test/test.pl --vm-out --module=command --test=check --vm=u20
|
||||
pgbackrest/test/test.pl --vm-out --module=command --test=check --vm=u22
|
||||
```
|
||||
> **NOTE:** Not all systems perform at the same speed, so if a test is timing out, try rerunning with another vm.
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
</variable-list>
|
||||
|
||||
<!-- Setup hosts used to build the documentation =========================================================================== -->
|
||||
<host-define if="{[os-type-is-debian]}" image="{[host-contrib-image]}" from="ubuntu:20.04">
|
||||
<host-define if="{[os-type-is-debian]}" image="{[host-contrib-image]}" from="ubuntu:22.04">
|
||||
{[copy-ca-cert]}
|
||||
|
||||
# Fix root tty
|
||||
@@ -76,9 +76,9 @@
|
||||
<section id="environment">
|
||||
<title>Building a Development Environment</title>
|
||||
|
||||
<p>This example is based on <proper>Ubuntu 20.04</proper>, but it should work on many versions of <proper>Debian</proper> and <proper>Ubuntu</proper>.</p>
|
||||
<p>This example is based on <proper>Ubuntu 22.04</proper>, but it should work on many versions of <proper>Debian</proper> and <proper>Ubuntu</proper>.</p>
|
||||
|
||||
<host-add id="{[host-contrib-id]}" name="{[host-contrib]}" user="{[host-contrib-user]}" image="{[host-contrib-image]}" os="u20" option="-v /var/run/docker.sock:/var/run/docker.sock -v {[cwd]}/test:{[cwd]}/test" mount="/home/{[host-contrib-user]}/pgbackrest:/home/{[host-contrib-user]}/pgbackrest"/>
|
||||
<host-add id="{[host-contrib-id]}" name="{[host-contrib]}" user="{[host-contrib-user]}" image="{[host-contrib-image]}" os="u22" option="-v /var/run/docker.sock:/var/run/docker.sock -v {[cwd]}/test:{[cwd]}/test" mount="/home/{[host-contrib-user]}/pgbackrest:/home/{[host-contrib-user]}/pgbackrest"/>
|
||||
|
||||
<execute-list host="{[host-contrib]}">
|
||||
<title>Install development tools</title>
|
||||
@@ -381,13 +381,13 @@ pgbackrest/doc/doc.pl --help
|
||||
<section id="with-docker" depend="/environment">
|
||||
<title>With Docker</title>
|
||||
|
||||
<p>Build a container to run tests. The vm must be pre-configured but a variety are available. A vagrant file is provided in the test directory as an example of running in a virtual environment. The vm names are all three character abbreviations, e.g. <id>u20</id> for <proper>Ubuntu 20.04</proper>.</p>
|
||||
<p>Build a container to run tests. The vm must be pre-configured but a variety are available. A vagrant file is provided in the test directory as an example of running in a virtual environment. The vm names are all three character abbreviations, e.g. <id>u22</id> for <proper>Ubuntu 22.04</proper>.</p>
|
||||
|
||||
<execute-list host="{[host-contrib]}">
|
||||
<title>Build a VM</title>
|
||||
|
||||
<execute output="y">
|
||||
<exe-cmd>pgbackrest/test/test.pl --vm-build --vm=u20</exe-cmd>
|
||||
<exe-cmd>pgbackrest/test/test.pl --vm-build --vm=u22</exe-cmd>
|
||||
<exe-cmd-extra>{[test-cmd-extra]}</exe-cmd-extra>
|
||||
</execute>
|
||||
</execute-list>
|
||||
@@ -398,7 +398,7 @@ pgbackrest/doc/doc.pl --help
|
||||
<title>Run a Specific Test Run</title>
|
||||
|
||||
<execute output="y">
|
||||
<exe-cmd>pgbackrest/test/test.pl {[dash]}-vm=u20 {[dash]}-module=postgres {[dash]}-test=interface {[dash]}-run=2</exe-cmd>
|
||||
<exe-cmd>pgbackrest/test/test.pl {[dash]}-vm=u22 {[dash]}-module=postgres {[dash]}-test=interface {[dash]}-run=2</exe-cmd>
|
||||
<exe-cmd-extra>{[test-cmd-extra]}</exe-cmd-extra>
|
||||
</execute>
|
||||
</execute-list>
|
||||
@@ -592,7 +592,7 @@ TEST_ERROR(cmdCheck(), ConfigError, "primary database not found\nHINT: check ind
|
||||
<p>Unit tests are run for all files that are listed in <file>define.yaml</file> and a coverage report generated for each file listed under the tag <code>coverage:</code>. Note that some files are listed in multiple <code>coverage:</code> sections for a module; in this case, each test for the file being modified should be specified for the module in which the file exists (e.g. <code>--module=storage --test=posix --test=gcs</code>, etc.) or, alternatively, simply run the module without the <code>--test</code> option. It is recommended that a <code>--vm</code> be specified since running the same test for multiple vms is unnecessary for coverage. The following example would run the test set from the <b>define.yaml</b> section detailed above.</p>
|
||||
|
||||
<code-block>
|
||||
pgbackrest/test/test.pl --vm-out --module=command --test=check --vm=u20
|
||||
pgbackrest/test/test.pl --vm-out --module=command --test=check --vm=u22
|
||||
</code-block>
|
||||
|
||||
<admonition type="note">Not all systems perform at the same speed, so if a test is timing out, try rerunning with another vm.</admonition>
|
||||
|
||||
Reference in New Issue
Block a user