Skip to content

Commit 37270ec

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 12f4a6e commit 37270ec

2 files changed

Lines changed: 28 additions & 28 deletions

File tree

CONTRIBUTING.md

Lines changed: 21 additions & 21 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
```
@@ -238,7 +238,7 @@ pgbackrest/test/test.pl --dry-run
238238
P00 INFO: test begin on x86_64 - log level info
239239
P00 INFO: clean autogenerate code
240240
--> P00 INFO: 83 tests selected
241-
241+
242242
P00 INFO: P1-T01/83 - vm=none, module=common, test=error
243243
[filtered 80 lines of output]
244244
P00 INFO: P1-T82/83 - vm=none, module=performance, test=type
@@ -260,27 +260,27 @@ pgbackrest/test/test.pl --vm-out --module=common --test=wait
260260
P00 INFO: autogenerate code
261261
P00 INFO: build for none (/home/vagrant/test/build/none)
262262
P00 INFO: 1 test selected
263-
263+
264264
P00 INFO: P1-T1/1 - vm=none, module=common, test=wait
265-
265+
266266
P00 INFO: test command begin 2.54.2: [common/wait] --log-level=info --no-log-timestamp --repo-path=/home/vagrant/test/repo --scale=1 --test-path=/home/vagrant/test --vm=none --vm-id=0
267267
P00 INFO: test command end: completed successfully
268268
run 1 - waitNew(), waitMore, and waitFree()
269269
L0018 expect AssertError: assertion 'waitTime <= 999999000' failed
270-
270+
271271
run 1/1 ----- L0021 0ms wait
272272
L0025 new wait
273273
L0026 check wait time
274274
L0027 check sleep time
275275
L0028 check sleep prev time
276276
L0029 no wait more
277-
277+
278278
run 1/2 ----- L0032 100ms with retries after time expired
279279
L0034 new wait
280280
L0037 time expired, first retry
281281
L0038 time expired, second retry
282282
L0039 time expired, retries expired
283-
283+
284284
run 1/3 ----- L0042 200ms wait
285285
L0046 new wait = 0.2 sec
286286
L0047 check wait time
@@ -295,7 +295,7 @@ pgbackrest/test/test.pl --vm-out --module=common --test=wait
295295
L0064 lower range check
296296
L0065 upper range check
297297
L0067 free wait
298-
298+
299299
run 1/4 ----- L0070 1100ms wait
300300
L0074 new wait = 1.1 sec
301301
L0075 check wait time
@@ -305,16 +305,16 @@ pgbackrest/test/test.pl --vm-out --module=common --test=wait
305305
L0084 lower range check
306306
L0085 upper range check
307307
L0087 free wait
308-
308+
309309
run 1/5 ----- L0090 waitRemainder()
310310
L0092 new wait = 500ms
311311
L0093 check initial wait remainder
312312
L0094 check initial wait remainder
313313
L0098 check updated wait remainder
314314
L0099 check updated wait remainder
315-
315+
316316
TESTS COMPLETED SUCCESSFULLY
317-
317+
318318
P00 INFO: P1-T1/1 - vm=none, module=common, test=wait
319319
P00 INFO: tested modules have full coverage
320320
P00 INFO: TESTS COMPLETED SUCCESSFULLY
@@ -336,7 +336,7 @@ pgbackrest/test/test.pl --module=postgres
336336
P00 INFO: autogenerate code
337337
P00 INFO: build for none (/home/vagrant/test/build/none)
338338
P00 INFO: 2 tests selected
339-
339+
340340
P00 INFO: P1-T1/2 - vm=none, module=postgres, test=client
341341
P00 INFO: P1-T2/2 - vm=none, module=postgres, test=interface
342342
P00 INFO: tested modules have full coverage
@@ -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
377-
378-
P00 INFO: P1-T1/1 - vm=u20, module=postgres, test=interface, run=2
377+
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)