1
0
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:
d.lepikhova
2022-06-22 14:36:55 +05:00
parent acc8edcd62
commit 039e3c8678
2 changed files with 24 additions and 6 deletions

View File

@ -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)