David Steele
abb9651f4c
Test harness improvements.
...
* Allow more than one test to provide coverage for the same module.
* Add option to disable valgrind.
* Add option to disabled coverage.
* Add option to disable debug build.
* Add option to disable compiler optimization.
* Add --dev-test mode.
2018-05-18 06:45:14 -04:00
David Steele
790f7c7312
Enforce full branch coverage in C code.
2018-05-05 11:50:11 -04:00
David Steele
ea4046a607
Try tweaking time sync settings to prevent clock drift rather than restarting VBoxService on every test run.
2018-04-18 18:47:43 -04:00
David Steele
dce11ce3cf
Generate code counts for all source files.
...
The source files are also classified by type and purpose.
2018-04-16 15:52:17 -04:00
David Steele
f0250dab4b
Move async forking and more error handling to C.
...
The Perl process was exiting directly when called but that interfered with proper locking for the forked async process. Now Perl returns results to the C process which handles all errors, including signals.
2018-04-12 20:42:26 -04:00
David Steele
c9ce20d41a
Skip version checks when testing in --dev mode.
2018-04-09 16:46:36 -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
a8721ffe11
Improve logic for smart builds to include version changes.
2018-03-27 22:48:22 -04:00
David Steele
a2030da200
Specify prefix for lcov output.
...
This prevents pages from moving around depending on the subtest.
2018-03-20 16:01:38 -04:00
David Steele
d34142dee8
Update lcov settings.
...
Mark any coverage less that 100% as yellow, less that 90% as red.
Add comments to config file and make genhtml use it as well as lcov.
2018-03-20 09:47:51 -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
5b0748cf93
Always autogenerate code if --smart is not specified.
2018-03-19 20:25:55 -04:00
David Steele
8e9e97728c
Remove --smart from --expect tests.
...
This ensures that new binaries are built before running the tests.
2018-03-19 17:38:44 -04:00
David Steele
0c313713b1
Use clang for static code analysis during lint testing.
...
Nothing found except for some functions that should have been marked __noreturn__.
2018-03-18 13:32:19 -04:00
David Steele
4fb75c9cc1
Improve conversion of C exceptions to Exception objects.
...
Colons in the message would prevent all of the message from being loaded into the Exception object.
2018-03-15 11:03:28 -04:00
David Steele
f047cd0dfd
Improve code generation performance.
2018-03-09 23:00:20 -05:00
David Steele
b987f05f35
Improve bin and libc build performance.
2018-03-09 21:24:30 -05:00
David Steele
c32ee34612
Build with -DNDEBUG by default but disable for testing.
2018-03-09 18:28:34 -05:00
David Steele
5d1722b8ef
Disable console display of coverage for C files.
...
Devel::Cover does not handle it well.
2018-03-01 13:32:51 -05:00
David Steele
5b491b3035
Add CentOS/RHEL package builds.
2018-02-26 19:32:27 -05:00
David Steele
27678f6188
Clean up and document Makefile.
2018-02-18 10:44:58 -05:00
David Steele
81952c41f4
Report coverage errors via the console.
...
This helps with debugging coverage issues on remote services like Travis.
2018-02-14 17:13:18 -05:00
David Steele
5f2884cb29
Suppress coverage failures for Archive/Push/Async on Travis.
...
The coverage report shows some code as never being run -- but that makes no sense because the tests pass. This may be due to trying to combine the C and Perl coverage reports and overwriting some runs.
Suppress for now with a plan to implement LCOV for the C unit tests.
2018-02-14 16:46:52 -05:00
David Steele
a907fd7d2d
Build C binary/library for C unit tests that require Perl.
2018-02-14 10:33:21 -05: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
f0ef1dee05
Improve speed of C unit tests.
...
Preserve object files between tests and use a Makefile to avoid rebuilding object files.
2018-01-26 16:41:17 -05:00
David Steele
404ec30d03
Move Perl help test to real module.
2018-01-23 12:58:35 -05:00
David Steele
915ae5662a
Implement version command in C.
2017-11-28 21:44:05 -05:00
David Steele
4a0eb6863d
Sync time to prevent build failures when running on VirtualBox.
2017-11-27 22:16:24 -05:00
David Steele
332861c6c9
Only build C binary/library for Perl unit/integration tests.
2017-11-27 21:19:59 -05:00
David Steele
74d6398ad2
The pgbackrest executable is now a C binary instead of Perl.
...
This allows certain time-critical commands (like async archive-push) to run more quickly.
2017-11-26 18:43:51 -05:00
David Steele
22fe684b1f
Only check expect logs on CentOS 7.
...
Variations in distros cause false negatives in tests but don't add much value.
2017-11-14 17:16:39 -05:00
David Steele
bcdfc7d0b5
Enable additional warnings for C builds.
2017-11-06 22:55:34 -05:00
David Steele
ac542788da
Convert configuration definitions from auto-generated functions to auto-generated data structures.
2017-11-02 08:14:13 -04:00
David Steele
b2cc65d886
Improve performance of test code.
...
Wait when all tests have been assigned to reduce CPU load.
2017-10-24 10:35:42 -04:00
David Steele
9b98c2e7d6
Run all tests on tempfs rather than local disk.
2017-10-22 13:11:03 -04:00
David Steele
904b83747c
Perl error handler recognizes errors thrown from the C library.
2017-10-16 10:47:31 -04:00
David Steele
10dfbd90b5
Add C unit test infrastructure.
2017-10-12 12:55:48 -04:00
David Steele
d89b7d5862
Warnings in C builds treated as errors.
2017-09-30 10:48:25 -04:00
David Steele
40a85e34f1
Improve C library smart build.
...
Ignore changes outside of /lib/pgBackRest/Config.
2017-09-20 19:57:05 -04:00
David Steele
1e0ed07455
Configuration rules are now pulled from the C library when present.
2017-08-25 16:47:47 -04:00
David Steele
7dab459cac
Simplified smart logic for C Library and package builds.
2017-08-19 08:48:13 -04:00
David Steele
156fd4d54d
Add bIgnoreMissing parameter to Local->manifest().
2017-07-25 12:44:38 -04:00
Cynthia Shang
cda3b9821b
Improved WAL data returned by info command.
...
Modified the info command (both text and JSON output) to display the archive ID and minimum/maximum WAL currently present in the archive for the current and prior, if any, database cluster version.
Contributed by Cynthia Shang.
2017-07-21 17:32:41 -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
f8849d7359
Remove patch directory before Debian package builds.
...
Patches should be merged into master before trying a new build after a release with patches.
2017-06-22 12:37:21 -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
David Steele
64ec7eb490
Eliminate redundancy in real tests.
2017-06-21 16:07:13 -04:00
David Steele
de7fc37f88
Storage and IO layer refactor:
...
Refactor storage layer to allow for new repository filesystems using drivers. (Reviewed by Cynthia Shang.)
Refactor IO layer to allow for new compression formats, checksum types, and other capabilities using filters. (Reviewed by Cynthia Shang.)
2017-06-09 17:51:41 -04:00