Merge pull request #501 from postgrespro/enable_nls_check

Add checking enable-nls option in configure
This commit is contained in:
dlepikhova
2022-08-03 18:55:43 +05:00
committed by GitHub
2 changed files with 21 additions and 6 deletions
+11
View File
@@ -101,6 +101,16 @@ def is_enterprise():
else:
return False
def is_nls_enabled():
cmd = [os.environ['PG_CONFIG'], '--configure']
p = subprocess.Popen(
cmd,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE
)
return b'enable-nls' in p.communicate()[0]
class ProbackupException(Exception):
def __init__(self, message, cmd):
@@ -147,6 +157,7 @@ def slow_start(self, replica=False):
class ProbackupTest(object):
# Class attributes
enterprise = is_enterprise()
enable_nls = is_nls_enabled()
def __init__(self, *args, **kwargs):
super(ProbackupTest, self).__init__(*args, **kwargs)