Skip to content

WIP: Add support for testing upgrade scripts #128

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

Merged
merged 61 commits into from
Nov 7, 2019

Conversation

decibel
Copy link
Collaborator

@decibel decibel commented Nov 9, 2016

Add support for testing of pgTap update scripts.

This commit adds several new make targets:

  • make uninstall-all: remove ALL installed pgtap code. Unlike make unintall, this removes pgtap*, not just our defined targets. Useful when testing multiple versions of pgtap.
  • make regress: run installcheck then print any diffs from expected output.
  • make updatecheck: install an older version of pgTap from PGXN (controlled by $UPDATE_FROM; 0.95.0 by default), update to the current version via ALTER EXTENSION, then run installcheck.
  • make results: runs make test and copies all result files to test/expected/. DO NOT RUN THIS UNLESS YOU'RE CERTAIN ALL YOUR TESTS ARE PASSING!

In addition to these changes, make installcheck now runs as many tests as possible in parallel. This is much faster than running them sequentially. The degree of parallelism can be controlled via $PARALLEL_CONN. Setting $PARALLEL_CONN to 1 will go back to a serial test schedule.

Jim Nasby added 30 commits October 22, 2016 21:00
Unlike other tests, these only run during certain test schedules.
By default, parallel mode will run almost all tests simultaneously,
which can result in individual tests taking a really long time.
Previously, pgtap was not tested as an installed extension. Changing
that affects the output of the extension tests.

See also theory#121
Some versions of test don’t recognize ==
This triggered errors on Travis-CI
@decibel decibel force-pushed the master branch 2 times, most recently from 2b4e6b8 to 0322ca7 Compare February 21, 2019 23:10
@decibel decibel mentioned this pull request Oct 2, 2019
The version exclusion for testing the policy test functions got lost
while improving the test exclusion and scheduling; add it back in. Add
more comments to the Makefile.
Prior to 9.2, the community make files simply did 'rm -f' for everything in $(EXTRA_CLEAN).
Clearly that won't work for a directory, so clean up test/build the hard way.
@decibel
Copy link
Collaborator Author

decibel commented Oct 7, 2019

@theory do you want to review this before I commit it?

@theory
Copy link
Owner

theory commented Oct 8, 2019

@theory do you want to review this before I commit it?

I'll take a look when I have a few spare minutes. Thanks! Looks like some super useful improvements to managing the code.

Copy link
Owner

@theory theory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lotta stuff here I don't follow, but I'm excited for big maintenance improvements!

@decibel decibel merged commit d60b8f5 into theory:master Nov 7, 2019
@decibel decibel deleted the test_upgrade branch November 7, 2019 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants