10 Commits

Author SHA1 Message Date
noctarius aka Christoph Engelbert
05b66accfa Fix location (and name) of .perltidyrc
Update the location and name of .perltidyrc in the README

After the recent change (244b3e637c)
the location and name of perltitdyrc has changed.

Signed-off-by: noctarius aka Christoph Engelbert <me@noctarius.com>
2023-09-27 09:40:48 +02:00
Jan Nidzwetzki
f172679022 Added perltidy make target
This patch introduces the make target 'perltidy' to format Perl files
with perltidy. In addition, calling perltidy is added to 'make format'.
2023-06-26 10:59:19 +02:00
Alexander Kuzmenkov
7758f5959c Update .clang-format for version 14
The only configuration we're missing is the newline for braces after
case labels. The rest of the differences looks like bugs/omissions of
the version 8 that we use now.

Require clang-format-14 in cmake and use it in the CI check. We can't
support versions earlier than 14 because they have some
formatting differences that can't be configured.
2022-10-10 17:12:36 +03:00
Markos Fountoulakis
9d0d159ac1 Port perl tests to support PG15
Port the timescaledb perl tests and the corresponding infrastructure to
support the new perl namespace introduced in PG15.

https://github.com/postgres/postgres/commit/b3b4d8e6
2022-09-23 11:40:48 +03:00
Sven Klemm
f92fe0cdd4 Make test settings explicit
Our tests assume timezone to be US/Pacific and will fail with
different values.
2022-08-16 11:00:42 +02:00
Sven Klemm
be44b1d87f Skip perl file installation without TAP_CHECKS
Don't install the TAP-related perl files when TAP checks has been
disabled. Installing this files unconditionally creates problem
when building packages as these files should not be part of the
package.
2021-08-01 19:56:37 +02:00
Nikhil
768ff54ae2 Add perl module files to PG install
We have added additional functionality in timescaledb extension to
use in tap tests. Install these perl files in the PG installation
directory so that external modules (the current "forge_ext" extension
as an example) can use this functionality without having to have an
additional dependency on the timescaledb extension source code. Note
that these perl files should be installed only if PG installation has
the relevant "${PG_PKGLIBDIR}/pgxs/src/test/perl" subdirectory.

Also rejig the configuration directory variable that's used for the
tap tests so that external modules can specify their own locations by
using their own values for it (the current variable was tightly tied to
timescaledb source code location).
2021-07-21 14:09:28 +05:30
Mats Kindahl
58b1eb83d4 Add TimescaleNode subclasses for TAP Testing
Use subclassing to inherit from `PostgresNode` and create a hierarchy
containing `AccessNode` and `DataNode` to simplify creating tests with
multiple nodes.

Also, two new functions are added:

`TimescaleNode::create`: Creates the new node by calling
`get_new_node`, `init` and `start` in that order.

`AccessNode::add_data_node`: Adds a new data node to the access node.

Also rewrite the test to use the new hierarchy.
2021-05-21 13:20:24 +02:00
Mats Kindahl
551ac56937 Add Perl code check GitHub action
Add a run of `perltidy` to make sure that all the Perl code is
correctly formatted. Also fix the formatting of one file that did not
follow the style in `scripts/perltidyrc`.
2021-05-21 12:50:51 +02:00
Nikhil
4efa51cd8d Add tap tests infrastructure support
The TAP testing PG framework meets our requirements for doing
multinode/stand-alone-binaries testing for scenarios which need
individual multiple PG instances (multi-node testing is a prime
example).

This commit adds the necessary wrappers to allow the use of the TAP
testing framework in timescale code base. The README in "test/perl"
directory gives a fair idea of how to write tap tests. A simple tap
test has been added to provide a reference point for developers to
write new ones.

One can go to "build/tsl/test" and invoke "make checkprove" to see
the tap test in action.

Also includes changes for enabling github CI to run these taptests by
installing the requisite dependencies.

Includes changes to license checking scripts to handle new *.pl and
*.pm files.

Also added a new scripts/perltidyrc to aid in formatting of these
files.
2021-05-19 13:49:02 +05:30