You've already forked pg_probackup
mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2025-07-16 07:14:15 +02:00
Add checking enable-nls option in configure For correct work test_help_6 we need skip this test if PostgreSQL configured without --enable-nls
This commit is contained in:
@ -101,6 +101,19 @@ def is_enterprise():
|
||||
else:
|
||||
return False
|
||||
|
||||
def enable_nls():
|
||||
cmd = [os.environ['PG_CONFIG'], '--configure']
|
||||
|
||||
p = subprocess.Popen(
|
||||
cmd,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE
|
||||
)
|
||||
if b'enable-nls' in p.communicate()[0]:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
class ProbackupException(Exception):
|
||||
def __init__(self, message, cmd):
|
||||
@ -147,6 +160,7 @@ def slow_start(self, replica=False):
|
||||
class ProbackupTest(object):
|
||||
# Class attributes
|
||||
enterprise = is_enterprise()
|
||||
enable_nls = enable_nls()
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(ProbackupTest, self).__init__(*args, **kwargs)
|
||||
|
Reference in New Issue
Block a user