aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/common/test_framework/test_file_common.py
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2024-12-24 23:49:23 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2024-12-25 00:01:38 +0300
commita227b54ce2fdd48f2fe9e0eb6a93e79055631284 (patch)
tree1ae2c72696c568040408a88f57b3a1357b3fd18c /yql/essentials/tests/common/test_framework/test_file_common.py
parentf5146f15b473fbf5a19b782af7fde119ace0024b (diff)
downloadydb-a227b54ce2fdd48f2fe9e0eb6a93e79055631284.tar.gz
Intermediate changes
commit_hash:590e82994e20a092dbe0ab18b8d2fd0fd6fc4dab
Diffstat (limited to 'yql/essentials/tests/common/test_framework/test_file_common.py')
-rw-r--r--yql/essentials/tests/common/test_framework/test_file_common.py22
1 files changed, 16 insertions, 6 deletions
diff --git a/yql/essentials/tests/common/test_framework/test_file_common.py b/yql/essentials/tests/common/test_framework/test_file_common.py
index 3fc5cfe025..3ff92a8b8b 100644
--- a/yql/essentials/tests/common/test_framework/test_file_common.py
+++ b/yql/essentials/tests/common/test_framework/test_file_common.py
@@ -14,10 +14,10 @@ from yqlrun import YQLRun
from test_utils import get_parameters_json, DATA_PATH, replace_vars
-def get_gateways_config(http_files, yql_http_file_server, force_blocks=False, is_hybrid=False):
+def get_gateways_config(http_files, yql_http_file_server, force_blocks=False, is_hybrid=False, allow_llvm=True):
config = None
- if http_files or force_blocks or is_hybrid:
+ if http_files or force_blocks or is_hybrid or not allow_llvm:
config_message = gateways_config_pb2.TGatewaysConfig()
if http_files:
schema = config_message.Fs.CustomSchemes.add()
@@ -34,6 +34,9 @@ def get_gateways_config(http_files, yql_http_file_server, force_blocks=False, is
deactivate_dq = config_message.Dq.DefaultSettings.add()
deactivate_dq.Name = "AnalyzeQuery"
deactivate_dq.Value = "0"
+ if not allow_llvm:
+ flags = config_message.YqlCore.Flags.add()
+ flags.Name = 'LLVM_OFF'
config = text_format.MessageToString(config_message)
return config
@@ -44,6 +47,9 @@ def is_hybrid(provider):
def check_provider(provider, config):
+ if provider == 'pure':
+ return
+
if provider not in get_supported_providers(config):
pytest.skip('%s provider is not supported here' % provider)
@@ -78,7 +84,8 @@ def get_sql_query(provider, suite, case, config):
return sql_query
-def run_file_no_cache(provider, suite, case, cfg, config, yql_http_file_server, yqlrun_binary=None, extra_args=[], force_blocks=False):
+def run_file_no_cache(provider, suite, case, cfg, config, yql_http_file_server,
+ yqlrun_binary=None, extra_args=[], force_blocks=False, allow_llvm=True):
check_provider(provider, config)
sql_query = get_sql_query(provider, suite, case, config)
@@ -105,7 +112,7 @@ def run_file_no_cache(provider, suite, case, cfg, config, yql_http_file_server,
prov=provider,
keep_temp=not re.search(r"yt\.ReleaseTempData", sql_query),
binary=yqlrun_binary,
- gateway_config=get_gateways_config(http_files, yql_http_file_server, force_blocks=force_blocks, is_hybrid=is_hybrid(provider)),
+ gateway_config=get_gateways_config(http_files, yql_http_file_server, force_blocks=force_blocks, is_hybrid=is_hybrid(provider), allow_llvm=allow_llvm),
extra_args=extra_args,
udfs_dir=yql_binary_path('yql/essentials/tests/common/test_framework/udfs_deps')
)
@@ -142,9 +149,12 @@ def run_file_no_cache(provider, suite, case, cfg, config, yql_http_file_server,
return fixed_result, tables_res
-def run_file(provider, suite, case, cfg, config, yql_http_file_server, yqlrun_binary=None, extra_args=[], force_blocks=False):
+def run_file(provider, suite, case, cfg, config, yql_http_file_server, yqlrun_binary=None,
+ extra_args=[], force_blocks=False, allow_llvm=True):
if (suite, case, cfg) not in run_file.cache:
- run_file.cache[(suite, case, cfg)] = run_file_no_cache(provider, suite, case, cfg, config, yql_http_file_server, yqlrun_binary, extra_args, force_blocks=force_blocks)
+ run_file.cache[(suite, case, cfg)] = \
+ run_file_no_cache(provider, suite, case, cfg, config, yql_http_file_server,
+ yqlrun_binary, extra_args, force_blocks=force_blocks, allow_llvm=allow_llvm)
return run_file.cache[(suite, case, cfg)]