Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve init_test #54

Closed
vitcpp opened this issue Aug 16, 2023 · 8 comments
Closed

Improve init_test #54

vitcpp opened this issue Aug 16, 2023 · 8 comments

Comments

@vitcpp
Copy link
Contributor

vitcpp commented Aug 16, 2023

Dear All,

What is the purpose of init_test? Do we really need it? This test introduces some difficulties when working with PRs. It is executed when executing gmake test, but gmake installcheck doesn't execute this test.

I propose to remove it.

@esabol
Copy link
Contributor

esabol commented Aug 16, 2023

I'm not sure what the intention was.

If you do remove it, would gmake test just be an alias for gmake installcheck?

@vitcpp
Copy link
Contributor Author

vitcpp commented Aug 17, 2023

@esabol There is the difference between test and installcheck rules. gmake installcheck runs tests on the existing installation. gmake test creates a local installation, runs postgresql instance and executes tests on it. These rules play different roles. What I think is to support gmake check to make consistent with the postgresql project tree.

@esabol
Copy link
Contributor

esabol commented Aug 17, 2023

There is the difference between test and installcheck rules. gmake installcheck runs tests on the existing installation. gmake test creates a local installation, runs postgresql instance and executes tests on it. These rules play different roles.

Yes, I knew that, or I thought so anyway. What I meant was the intention of init_test.sql specifically.

@vitcpp
Copy link
Contributor Author

vitcpp commented Aug 28, 2023

I think, the init_test goal is to find problems in pgs_xxx.sql files that are used to initialize the extension. This test creates a single file pg_sphere.test.sql from the contents of pgs_xxx.sql files with some changes (MODULE_PATH is replaced with the absolute path to local pg_sphere.so) and then runs the file as a regular test. If a problem exists, it can be detected by the test output difference after test execution. I think this test is reasonable because it may help developers to detect some problems with newly created functionality as well as when migrating to newer versions of Postgresql. Anyway, it should be improved to avoid expected/init_test.out conflicts when touching independent pgs_xxx.sql files.

@vitcpp vitcpp changed the title Does it make sense to run init_test? Improve init_test Sep 5, 2023
@df7cb
Copy link
Contributor

df7cb commented Oct 23, 2023

I think this issue has already been addressed by #79.

@esabol
Copy link
Contributor

esabol commented Mar 16, 2024

Close this issue, @vitcpp ?

@vitcpp
Copy link
Contributor Author

vitcpp commented Mar 18, 2024

@esabol Yes, thank you. I will close the issue.

@vitcpp
Copy link
Contributor Author

vitcpp commented Mar 18, 2024

Closed as completed in #79.

@vitcpp vitcpp closed this as completed Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants