Convert sepgsql tests to TAP
Peter Eisentraut <peter@eisentraut.org>
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2024-05-13T06:16:10Z
Lists: pgsql-hackers
Attachments
- v1-0001-Convert-sepgsql-tests-to-TAP.patch (text/plain) patch v1-0001
The sepgsql tests have not been integrated into the Meson build system yet. I propose to fix that here. One problem there was that the tests use a very custom construction where a top-level shell script internally calls make. I have converted this to a TAP script that does the preliminary checks and then calls pg_regress directly, without make. This seems to get the job done. Also, once you have your SELinux environment set up as required, the test now works fully automatically; you don't have to do any manual prep work. The whole thing is guarded by PG_TEST_EXTRA=sepgsql now. Some comments and questions: - Do we want to keep the old way to run the test? I don't know all the testing scenarios that people might be interested in, but of course it would also be good to cut down on the duplication in the test files. - Strangely, there was apparently so far no way to get to the build directory from a TAP script. They only ever want to read files from the source directory. So I had to add that. - If you go through the pre-test checks in contrib/sepgsql/test_sepgsql, I have converted most of these checks to the Perl script. Some of the checks are obsolete, because they check whether the database has been correctly initialized, which is now done by the TAP script anyway. One check that I wasn't sure about is the # 'psql' command must be executable from test domain The old test was checking the installation tree, which I guess could be set up in random ways. But do we need this kind of check if we are using a temporary installation? As mentioned in the patch, the documentation needs to be updated. This depends on the outcome of the question above whether we want to keep the old tests in some way.
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
sepgsql: update TAP test to use fat comma style
- cc2c9fa6960c 18.0 landed
-
Convert sepgsql tests to TAP
- aeb8ea361a0a 18.0 landed
-
meson: Fix sepgsql installation
- 155d6162e457 16.7 landed
- 24c5b73eb6ec 17.3 landed
- 02ed3c2bdcef 18.0 landed