+ Building a Development Environment
+
+ This example is based on Ubuntu 19.04, but it should work on many versions of Debian and Ubuntu.
+
+
+
+
+ Install development tools
+
+
+
+ apt-get install rsync git devscripts build-essential valgrind autoconf
+ libssl-dev zlib1g-dev libperl-dev libxml2-dev libpq-dev libxml-checker-perl
+ libyaml-libyaml-perl libdbd-pg-perl
+
+ -y 2>&1
+
+
+
+ Coverage testing is an important component of testing and is integrated directly into the test harness. Unfortunately, the default version of lcov is often not compatible with gcc. lcov 1.14 works up to gcc 8.
+
+
+ Build lcov 2.14
+
+
+
+ curl -fsSL
+ https://github.com/linux-test-project/lcov/releases/download/v1.14/lcov-1.14.tar.gz |
+ tar zx
+
+
+
+
+ make -C lcov-1.14 install
+
+
+
+ Some unit tests and all the integration test require Docker. Running in containers allows us to simulate multiple hosts, test on different distributions and versions of , and use sudo without affecting the host system.
+
+
+ Install Docker
+
+
+ curl -fsSL https://get.docker.com | sudo sh
+ 2>&1
+
+
+
+
+ usermod -aG docker `whoami`
+
+
+
+
+ This clone of the repository is sufficient for experimentation. For development, create a fork and clone that instead.
+
+
+ Clone repository
+
+
+
+ git clone https://github.com/pgbackrest/pgbackrest.git
+
+
+
+
+
+