-
Notifications
You must be signed in to change notification settings - Fork 3
Run isolation tests if there is specs
folder.
#3
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for a nice feature! Can't wait to merge this when you're finished with dealing with those nitpicks.
isolation_args = [ | ||
os.path.join(instance.work_dir, | ||
"src/test/isolation/pg_isolation_regress"), | ||
"--temp-instance=%s" % tmpdir, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bikeshedding: I personally prefer format
to %
, since this is a recommended way of string formatting in 3.0+. Could you rewrite those pieces of code, please?
|
||
self._regress_opts = None | ||
|
||
def get_temp_config(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is a perfect candidate for being a property.
|
||
|
||
class Extension: | ||
def __init__(self, work_dir, pg_config): | ||
self.work_dir = work_dir | ||
self.pg_config = pg_config | ||
|
||
def make(self, targets=None, options=None): | ||
self.specs = None | ||
specs_dir = os.path.join(work_dir, 'specs') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably shouldn't hardwire specs
dir name. Maybe we could add a default-able flag to the pgxs
command?
"src/test/isolation/pg_isolation_regress"), | ||
"--temp-instance=%s" % tmpdir, | ||
"--inputdir=.", | ||
"--outputdir=output_iso", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needless contraction -- output_isolation
?
if target in ('check', 'installcheck') and self.specs: | ||
print(Style.green('\n$ make isolationcheck')) | ||
|
||
tmpdir = os.path.join(self.work_dir, "tmp_check_iso") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should use mkdtemp
to make sure that dir name is unique? Otherwise it could result in name clash when used in parallel builds.
No description provided.