Skip to content

Commit e750592

Browse files
dwsteeleGirgerS
authored andcommitted
Update contributing guide to Ubuntu 22.04.
20.04 is EOL and Docker is now noisy during installation so update. (cherry picked from commit d55836e) Changes compared to the original commit: - Use actual output of the test.pl script
1 parent a0da694 commit e750592

2 files changed

Lines changed: 16 additions & 16 deletions

File tree

CONTRIBUTING.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Coding standards are defined in [CODING.md](https://github.com/pgbackrest/pgback
2626

2727
## Building a Development Environment
2828

29-
This example is based on Ubuntu 20.04, but it should work on many versions of Debian and Ubuntu.
29+
This example is based on Ubuntu 22.04, but it should work on many versions of Debian and Ubuntu.
3030

3131
pgbackrest-dev => Install development tools
3232
```
@@ -345,24 +345,24 @@ pgbackrest/test/test.pl --module=postgres
345345
346346
#### With Docker
347347
348-
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.
348+
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.
349349
350350
pgbackrest-dev => Build a VM
351351
```
352-
pgbackrest/test/test.pl --vm-build --vm=u20
352+
pgbackrest/test/test.pl --vm-build --vm=u22
353353

354354
--- output ---
355355

356356
P00 INFO: test begin on x86_64 - log level info
357-
P00 INFO: Using cached pgbackrest/test:u20-base-20241016A image (711ee90bf3ea0e8bb054285193811266b9b1f2f3) ...
358-
P00 INFO: Building pgbackrest/test:u20-test image ...
357+
P00 INFO: Building pgbackrest/test:u22-base-x86_64 image (57c2af91a1b1a9624e325b704cc9213821c6b968) ...
358+
P00 INFO: Building pgbackrest/test:u22-test-x86_64 image ...
359359
P00 INFO: Build Complete
360360
```
361361
> **NOTE:** to build all the vms, just omit the `--vm` option above.
362362
363363
pgbackrest-dev => Run a Specific Test Run
364364
```
365-
pgbackrest/test/test.pl --vm=u20 --module=postgres --test=interface --run=2
365+
pgbackrest/test/test.pl --vm=u22 --module=postgres --test=interface --run=2
366366

367367
--- output ---
368368

@@ -372,10 +372,10 @@ pgbackrest/test/test.pl --vm=u20 --module=postgres --test=interface --run=2
372372
P00 INFO: autogenerated version in configure.ac script: no changes
373373
P00 INFO: autogenerated configure script: no changes
374374
P00 INFO: autogenerate code
375-
P00 INFO: clean build for u20 (/home/vagrant/test/build/u20)
375+
P00 INFO: clean build for u22 (/home/vagrant/test/build/u22)
376376
P00 INFO: 1 test selected
377377
378-
P00 INFO: P1-T1/1 - vm=u20, module=postgres, test=interface, run=2
378+
P00 INFO: P1-T1/1 - vm=u22, module=postgres, test=interface, run=2
379379
P00 INFO: TESTS COMPLETED SUCCESSFULLY
380380
```
381381
@@ -530,7 +530,7 @@ TEST_ERROR(cmdCheck(), ConfigError, "primary database not found\nHINT: check ind
530530
531531
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.
532532
```
533-
pgbackrest/test/test.pl --vm-out --module=command --test=check --vm=u20
533+
pgbackrest/test/test.pl --vm-out --module=command --test=check --vm=u22
534534
```
535535
> **NOTE:** Not all systems perform at the same speed, so if a test is timing out, try rerunning with another vm.
536536

doc/xml/contributing.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
</variable-list>
2525

2626
<!-- Setup hosts used to build the documentation =========================================================================== -->
27-
<host-define if="{[os-type-is-debian]}" image="{[host-contrib-image]}" from="ubuntu:20.04">
27+
<host-define if="{[os-type-is-debian]}" image="{[host-contrib-image]}" from="ubuntu:22.04">
2828
{[copy-ca-cert]}
2929

3030
# Fix root tty
@@ -76,9 +76,9 @@
7676
<section id="environment">
7777
<title>Building a Development Environment</title>
7878

79-
<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>
79+
<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>
8080

81-
<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"/>
81+
<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"/>
8282

8383
<execute-list host="{[host-contrib]}">
8484
<title>Install development tools</title>
@@ -381,13 +381,13 @@ pgbackrest/doc/doc.pl --help
381381
<section id="with-docker" depend="/environment">
382382
<title>With Docker</title>
383383

384-
<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>
384+
<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>
385385

386386
<execute-list host="{[host-contrib]}">
387387
<title>Build a VM</title>
388388

389389
<execute output="y">
390-
<exe-cmd>pgbackrest/test/test.pl --vm-build --vm=u20</exe-cmd>
390+
<exe-cmd>pgbackrest/test/test.pl --vm-build --vm=u22</exe-cmd>
391391
<exe-cmd-extra>{[test-cmd-extra]}</exe-cmd-extra>
392392
</execute>
393393
</execute-list>
@@ -398,7 +398,7 @@ pgbackrest/doc/doc.pl --help
398398
<title>Run a Specific Test Run</title>
399399

400400
<execute output="y">
401-
<exe-cmd>pgbackrest/test/test.pl {[dash]}-vm=u20 {[dash]}-module=postgres {[dash]}-test=interface {[dash]}-run=2</exe-cmd>
401+
<exe-cmd>pgbackrest/test/test.pl {[dash]}-vm=u22 {[dash]}-module=postgres {[dash]}-test=interface {[dash]}-run=2</exe-cmd>
402402
<exe-cmd-extra>{[test-cmd-extra]}</exe-cmd-extra>
403403
</execute>
404404
</execute-list>
@@ -592,7 +592,7 @@ TEST_ERROR(cmdCheck(), ConfigError, "primary database not found\nHINT: check ind
592592
<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>
593593

594594
<code-block>
595-
pgbackrest/test/test.pl --vm-out --module=command --test=check --vm=u20
595+
pgbackrest/test/test.pl --vm-out --module=command --test=check --vm=u22
596596
</code-block>
597597

598598
<admonition type="note">Not all systems perform at the same speed, so if a test is timing out, try rerunning with another vm.</admonition>

0 commit comments

Comments
 (0)