diff --git a/test/regresstest/run_regress_test.py b/test/regresstest/run_regress_test.py index 9e9fd7972f75de2b43f533d56f99554b7096bca0..b3d45d821c3769b186e14faba2178a5a3b71e14b 100755 --- a/test/regresstest/run_regress_test.py +++ b/test/regresstest/run_regress_test.py @@ -390,18 +390,23 @@ def get_file_source(file): def setIntlEnviron(case): # intl environ LC_ALL + if 'LC_ALL' in os.environ: + del os.environ['LC_ALL'] + if 'TZ' in os.environ: + del os.environ['TZ'] real_path = case.replace('/regresstest/ark-regress/', '') if case.startswith('/') else case.replace('regresstest/ark-regress/', '') js_case_path = os.path.join(RegressTestConfig.REGRESS_TEST_CASE_DIR, real_path) if not os.path.exists(js_case_path): return; source = get_file_source(js_case_path) env_match = ENV_PATTERN.search(source) - if 'LC_ALL' in os.environ: - del os.environ['LC_ALL'] if env_match: for env_pair in env_match.group(1).strip().split(): var, value = env_pair.split('=') - os.environ['LC_ALL'] = value + if var.find('TZ') >= 0: + os.environ['TZ'] = value + if var.find('LC_ALL') >= 0: + os.environ['LC_ALL'] = value break; def run_test_case_dir(args, test_abc_files, force_gc_files, timeout=RegressTestConfig.DEFAULT_TIMEOUT):