Convert sepgsql tests to TAP
От | Peter Eisentraut |
---|---|
Тема | Convert sepgsql tests to TAP |
Дата | |
Msg-id | 651a5baf-5c45-4a5a-a202-0c8453a4ebf8@eisentraut.org обсуждение исходный текст |
Ответы |
Re: Convert sepgsql tests to TAP
|
Список | pgsql-hackers |
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.
Вложения
В списке pgsql-hackers по дате отправления: