1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2024-12-12 10:04:14 +02:00
Commit Graph

61 Commits

Author SHA1 Message Date
David Steele
7429aca8fa Remove redundant distro specification. 2020-12-09 17:26:52 -05:00
David Steele
d01669aa58 Move most tests to Github Actions.
Testing on Travis-CI has been getting slower (from ~18 minutes to 3-6 hours) and the travis-ci.org service will be terminated at the end of the year. Moving to travis-ci.com is an option but the quotas are too low for our purposes.

Instead use Github Actions, which does not currently have quotas, and runs our current tests with just a few tweaks.

This still leaves multi-architecture tests on Travis-CI but we may be able to run those and stay within the new quotas.

Also fix a minor bug in restoreTest.c exposed by Github Actions using a different name for the user and group.
2020-12-09 15:19:01 -05:00
David Steele
ec9f23d31f Remove CentOS 6 from tests and documentation.
CentOS6 EOL'd and the mirrors were swiftly deleted, leading to failures in tests and documentation.

Remove CentOS 6 for now to get builds going again with the intention to replace it in the near future with CentOS 8.
2020-12-02 16:23:05 -05:00
David Steele
9876d7096d Disable s390x builds on Travis-CI (again).
s390x currently is too unreliable to be part of required CI builds. They can sometimes take hours or days to get queued which makes getting commits through our workflow very time-consuming.
2020-08-20 11:24:27 -04:00
David Steele
4391497a05 Enable s390x builds on Travis-CI.
These were disabled in 6fc25c7a because s390x builds were not being queued. It looks like they are working again.
2020-08-18 08:17:13 -04:00
David Steele
6fc25c7a69 Disable s390x builds on Travis-CI.
s390x has not been building for about a day which is clogging the integration branch.
2020-08-05 13:38:44 -04:00
David Steele
d1ac2f7637 Rearrange Travis CI jobs based on current runtimes.
In general it is better to have slower jobs run earlier.
2020-07-21 07:34:02 -04:00
David Steele
3f0b41eb9c Add support for testing on 64-bit big-endian architectures.
In particular add support for s390x but we hope this will work for other 64-bit big-endian architectures.

Run basic unit tests on Travis CI for 390x.
2020-07-20 09:59:16 -04:00
David Steele
cffdadad92 Fix typo pp64le -> ppc64le.
Travis-CI guessed the correct value but logged a warning.
2020-05-18 19:55:09 -04:00
David Steele
ed5149c9be Disable package builds for CentOS 7 which are broken upstream. 2020-05-14 18:27:26 -04:00
David Steele
33cbdb78fd Add ppc64le to Travis-CI build matrix.
apt.postgresql.org provides packages for ppcle64 so it's important that we support it.

Rearrange jobs a bit based on current runtimes and importance. Also reduce the number of tests run for arm64 since it is slower than other architectures.
2020-05-11 10:10:22 -04:00
David Steele
faabf1227d Update Fedora container to Fedora 32.
This allows unit testing on gcc 10.

Also fix an incorrect enum in the config/config unit test that was caught by the new compiler.
2020-05-07 11:06:56 -04:00
David Steele
12a5d8a155 Add arm64 to Travis-CI build matrix.
apt.postgresql.org will soon be providing packages for arm64 so it's important that we support it.

Testing on multiple architectures also helps expose potential issues in popular architectures. See 10a5182d for an example.
2020-05-06 19:11:28 -04:00
David Steele
3fe6ad5047 Build branches with -cit suffix on Travis-CI.
This allows a branch to be targeted at only Travis-CI and not other CI services.
2020-05-06 10:23:42 -04:00
David Steele
65285ff5b2 Rearrange Travis CI jobs based on current runtimes.
The runtimes of the tests have change with recent updates and it is generally best to order the slowest tests first.
2020-03-26 22:00:40 -04:00
David Steele
0f742204e8 Add comments to make the purpose of each CI job clearer. 2020-03-26 21:39:40 -04:00
David Steele
09d26d54ce Updates for key changes in travis.yaml.
The format has evolved over time and the old keys were showing warnings during builds.
2020-03-26 21:16:21 -04:00
David Steele
50cf7370ee Add --no-performance to test.pl to suppress performance tests.
Performance tests do not need to be run on all platforms. Using vm=none to run performance tests seems best ... for performance.
2020-03-26 20:36:09 -04:00
David Steele
2c2bc8a32b Debug and optimize flag cleanup for unit tests.
Decisions about when to optimize or enable debug code were spread out in too many places making it hard to keep them consistent.

Centralize the logic as much as possible to make it easier to maintain.
2020-03-26 12:16:22 -04:00
David Steele
0f7fe55f72 Build packages on demand only and change build path.
Building packages is not a normal part of development so don't build packages by default. Instead build them in CI as needed.

Do the builds in test/result instead of .vagrant to be friendlier with hosts that are not running vagrant. Anyway, it's probably not a good idea to be creating files in the .vagrant path.
2020-03-14 14:35:09 -04:00
David Steele
c279a00279 Add lz4 compression support.
LZ4 compresses data faster than gzip but at a lower ratio.  This can be a good tradeoff in certain scenarios.

Note that setting compress-type=lz4 will make new backups and archive incompatible (unrestorable) with prior versions of pgBackRest.
2020-03-10 14:45:27 -04:00
David Steele
03d434c7e1 Remove RHEL package patch now that it has been merged upstream.
Also revert 731ffcfb and update ContainerTest.pm for upstream changes.
2020-01-21 11:57:59 -07:00
David Steele
731ffcfb3d Disable RHEL package builds since upstream is broken. 2020-01-16 14:29:04 -07:00
David Steele
b031dbbcf8 Allow timezones to be explicitly set for testing.
The TZ environment variable was not reliably pushed down to the test processes.

Instead pass TZ via a command line parameter and set explicitly in the test process.
2019-12-11 22:11:04 -05:00
David Steele
90e19d99ba Add mock module to CentOS6/7 Travis CI testing.
This was dropped at some point but is important for integration coverage.
2019-11-16 09:38:42 -05:00
David Steele
fa6a54bb45 Update last tests that required sudo.
All tests should now run in a sudo-less environment.
2019-10-16 17:05:24 +02:00
David Steele
b4aeb217e6 Allow parameters to be passed to travis.pl.
This makes configuring tests easier.

Also add a parameter for tests that require sudo.  This should be retired at some point but some tests still require it.
2019-10-15 17:19:42 +02:00
David Steele
b1dc5a6d26 Add disk/mem info for Travis.
This is helpful for determining the virtual machine resources.
2019-10-13 14:02:52 -04:00
David Steele
e732720d85 Disable docker service for --vm=none test.
Starting this service wastes time and this will help catch any regressions where containers are being built when they should not be.
2019-10-10 11:28:37 -04:00
David Steele
7f369006b5 Add gcc 9 support.
A number of tests have been updated and Fedora 30 has been added to the test suite so the unit tests can run on gcc 9.

Stop running unit tests on co6/7 since we appear to have ample unit test coverage.
2019-10-09 15:03:03 -04:00
David Steele
61c4f64895 Be smarter about which packages are loaded for testing.
Now that our tests are more diversified it makes sense to load only the packages that are needed for each test.

Move the package loads from .travis.yaml to test/travis.pl where we have more control over what is loaded.
2019-10-08 18:56:55 -04:00
David Steele
45881c74ae Allow most unit tests to run outside of a container.
Three major changes were required to get this working:

1) Provide the path to pgbackrest in the build directory when running outside a container.  Tests in a container will continue to install and run against /usr/bin/pgbackrest.

1) Set a per-test lock path so tests don't conflict on the default /tmp/pgbackrest path.  Also set a per-test log-path while we are at it.

2) Use localhost instead of a custom host for TLS test connections.  Tests in containers will continue to update /etc/hosts and use the custom host.

Add infrastructure and update harnessCfgLoad*() to get the correct exe and paths loaded for testing.

Since new tests are required to verify that running outside a container works, also rework the tests in Travis CI to provide coverage within a reasonable amount of time.  Mainly, break up to doc tests by VM and run an abbreviated unit test suite on co6 and co7.
2019-10-08 12:06:30 -04:00
David Steele
f809d2f008 Ignore apt-get update errors in Travis CI.
Broken vendor packages have been causing builds to break due to an error on apt-get update.

Ignore errors and proceed directory to apt-get install.  It's possible that we'll try to reference an expired package version and get an error anyway, but that seems better than a guaranteed hard error.
2019-09-12 15:16:42 -04:00
David Steele
dca5b63f97 Move documentation job first for Travis CI.
Since this job has been running long recently this should improved overall performance when multiple commits are queued up.
2019-09-10 13:06:44 -04:00
David Steele
9836578520 Remove perl critic and coverage.
No new Perl code is being developed, so these tools are just taking up time and making migrations to newer platforms harder.  There are only a few Perl tests remaining with full coverage so the coverage tool does not warn of loss of coverage in most cases.

Remove both tools and associated libraries.
2019-07-05 16:55:17 -04:00
David Steele
027c263871 Add configure script for improved multi-platform support.
Use autoconf to provide a basic configure script. WITH_BACKTRACE is yet to be migrated to configure and the unit tests still use a custom Makefile.

Each C file must include "build.auto.conf" before all other includes and defines.  This is enforced by test.pl for includes, but it won't detect incorrect define ordering.

Update packages to call configure and use standard flags to pass options.
2019-04-26 08:08:23 -04:00
David Steele
1862630629 Use pre-built images from Docker Hub when the container definition has not changed.
Downloading an image is quite a bit faster than building a new image from scratch and saves minutes per test run in CI.
2018-07-21 17:02:42 -04:00
David Steele
a385cb520b Update primary test environment (Vagrant and Docker) to Ubuntu 18.04. 2018-06-06 15:52:28 -04:00
David Steele
4c7408ea52 Embed exported C functions and Perl modules directly into the pgBackRest executable. 2018-05-22 12:53:08 -04:00
David Steele
741acfd779 Move test definitions to test/define.yaml.
The location is better because it is no longer buried in the Perl test libs. Also, the data can be easily accessed from C.
2018-04-08 10:19:24 -04:00
David Steele
07f38f584a Use lcov for C unit test coverage reporting.
Switch from Devel::Cover because it would not report on branch coverage for reports converted from gcov.

Branch coverage is not complete, so for the time being errors will only be generated when statement coverage is not complete. Coverage of unit tests is not displayed in the report unless they are incomplete for either statement or branch coverage.
2018-03-19 23:33:28 -04:00
David Steele
1659598cfe Create a master list of errors in build/error.yaml.
The C and Perl errors lists are created automatically by Build.pm so they stay up to date.
2018-02-08 16:11:47 -05:00
David Steele
be90028100 Rename db-* options to pg-* and backup-* options to repo-* to improve consistency.
* repo-* options are now indexed although only one is allowed.
* List deprecated option names in documentation and command-line help.
2018-02-03 18:27:38 -05:00
David Steele
9fe265d24c No longer run master branch through CI.
The integration branch will be run through CI and then pushed to master with github status checks.
2017-12-19 17:03:17 -05:00
David Steele
cf3110b0d8 Use new Travis Trusty image. 2017-07-26 19:22:54 -04:00
David Steele
fdabf33604 Revert removal of Ubuntu 12.04 and PostgreSQL 8.3. 2017-06-27 15:58:02 -04:00
David Steele
7a1385cc27 Add documentation builds to CI. 2017-06-24 18:04:02 -04:00
David Steele
7a9b1f6993 Container build improvements:
* More optimized container suite that greatly improves build time.
* Added static Debian packages for Devel::Cover to reduce build time.
* Add deprecated state for containers. Deprecated containers may only be used to build packages.
* Remove Debian 8 from CI because it does not provide additional coverage over Ubuntu 14.04 and Ubuntu 16.04.
2017-06-24 10:59:00 -04:00
David Steele
6327799c9a Use old trusty image until new image works with RHEL6. 2017-06-22 18:13:59 -04:00
David Steele
8b9965abcb Remove process-max option.
Parallelism is now tested in a more targeted manner and the high level option is no longer needed.
2017-06-21 19:21:16 -04:00