Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swith dq_file/hybrid_file to yt suites #13153

Merged
merged 3 commits into from
Jan 5, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ydb/library/yql/tests/sql/dq_file.make
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PY2TEST()
PY3TEST()

TEST_SRCS(
test.py
Expand Down Expand Up @@ -31,7 +31,7 @@ DEPENDS(
)
DATA(
arcadia/ydb/library/yql/tests/sql # python files
arcadia/yql/essentials/tests/sql/suites
arcadia/yt/yql/tests/sql/suites
arcadia/yql/essentials/mount
arcadia/yql/essentials/cfg/tests
)
Expand Down
12 changes: 6 additions & 6 deletions ydb/library/yql/tests/sql/dq_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@
dump_table_yson, get_gateway_cfg_suffix, do_custom_query_check, normalize_result, \
stable_result_file, stable_table_file, is_with_final_result_issues, log

from test_utils import get_config, DATA_PATH
from test_utils import get_config
from test_file_common import run_file, run_file_no_cache

ASTDIFF_PATH = yql_binary_path('yql/essentials/tools/astdiff/astdiff')
DQRUN_PATH = yql_binary_path('ydb/library/yql/tools/dqrun/dqrun')

DATA_PATH = yatest.common.source_path('yt/yql/tests/sql/suites')

def run_test(suite, case, cfg, tmpdir, what, yql_http_file_server):
if get_gateway_cfg_suffix() != '' and what != 'Results':
pytest.skip('non-trivial gateways.conf')

config = get_config(suite, case, cfg)
config = get_config(suite, case, cfg, data_path=DATA_PATH)

program_sql = os.path.join(DATA_PATH, suite, '%s.sql' % case)
with codecs.open(program_sql, encoding='utf-8') as program_file_descr:
Expand All @@ -41,17 +41,17 @@ def run_test(suite, case, cfg, tmpdir, what, yql_http_file_server):
if is_with_final_result_issues(config):
extra_args += ["--with-final-issues"]

(res, tables_res) = run_file('dq', suite, case, cfg, config, yql_http_file_server, DQRUN_PATH, extra_args=extra_args)
(res, tables_res) = run_file('dq', suite, case, cfg, config, yql_http_file_server, DQRUN_PATH, extra_args=extra_args, data_path=DATA_PATH)

if what == 'Results' or force_blocks:
if not xfail:
if force_blocks:
yqlrun_res, yqlrun_tables_res = run_file_no_cache('dq', suite, case, cfg, config, yql_http_file_server, DQRUN_PATH, \
extra_args=["--emulate-yt"], force_blocks=True)
extra_args=["--emulate-yt"], force_blocks=True, data_path=DATA_PATH)
dq_result_name = 'Scalar'
yqlrun_result_name = 'Block'
else:
yqlrun_res, yqlrun_tables_res = run_file_no_cache('yt', suite, case, cfg, config, yql_http_file_server)
yqlrun_res, yqlrun_tables_res = run_file_no_cache('yt', suite, case, cfg, config, yql_http_file_server, data_path=DATA_PATH)
dq_result_name = 'DQFILE'
yqlrun_result_name = 'YQLRUN'

Expand Down
4 changes: 2 additions & 2 deletions ydb/library/yql/tests/sql/dq_file/part0/test.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import pytest
import yatest

from dq_file import run_test
from dq_file import run_test, DATA_PATH
from test_utils import pytest_generate_tests_for_part
from yql_utils import pytest_get_current_part


def pytest_generate_tests(metafunc):
current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
return pytest_generate_tests_for_part(metafunc, current_part, part_count)
return pytest_generate_tests_for_part(metafunc, current_part, part_count, data_path=DATA_PATH)


@pytest.mark.parametrize('what', ['Results', 'ForceBlocks'])
Expand Down
4 changes: 2 additions & 2 deletions ydb/library/yql/tests/sql/dq_file/part1/test.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import pytest
import yatest

from dq_file import run_test
from dq_file import run_test, DATA_PATH
from test_utils import pytest_generate_tests_for_part
from yql_utils import pytest_get_current_part


def pytest_generate_tests(metafunc):
current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
return pytest_generate_tests_for_part(metafunc, current_part, part_count)
return pytest_generate_tests_for_part(metafunc, current_part, part_count, data_path=DATA_PATH)


@pytest.mark.parametrize('what', ['Results', 'ForceBlocks'])
Expand Down
4 changes: 2 additions & 2 deletions ydb/library/yql/tests/sql/dq_file/part10/test.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import pytest
import yatest

from dq_file import run_test
from dq_file import run_test, DATA_PATH
from test_utils import pytest_generate_tests_for_part
from yql_utils import pytest_get_current_part


def pytest_generate_tests(metafunc):
current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
return pytest_generate_tests_for_part(metafunc, current_part, part_count)
return pytest_generate_tests_for_part(metafunc, current_part, part_count, data_path=DATA_PATH)


@pytest.mark.parametrize('what', ['Results', 'ForceBlocks'])
Expand Down
4 changes: 2 additions & 2 deletions ydb/library/yql/tests/sql/dq_file/part11/test.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import pytest
import yatest

from dq_file import run_test
from dq_file import run_test, DATA_PATH
from test_utils import pytest_generate_tests_for_part
from yql_utils import pytest_get_current_part


def pytest_generate_tests(metafunc):
current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
return pytest_generate_tests_for_part(metafunc, current_part, part_count)
return pytest_generate_tests_for_part(metafunc, current_part, part_count, data_path=DATA_PATH)


@pytest.mark.parametrize('what', ['Results', 'ForceBlocks'])
Expand Down
4 changes: 2 additions & 2 deletions ydb/library/yql/tests/sql/dq_file/part12/test.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import pytest
import yatest

from dq_file import run_test
from dq_file import run_test, DATA_PATH
from test_utils import pytest_generate_tests_for_part
from yql_utils import pytest_get_current_part


def pytest_generate_tests(metafunc):
current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
return pytest_generate_tests_for_part(metafunc, current_part, part_count)
return pytest_generate_tests_for_part(metafunc, current_part, part_count, data_path=DATA_PATH)


@pytest.mark.parametrize('what', ['Results', 'ForceBlocks'])
Expand Down
4 changes: 2 additions & 2 deletions ydb/library/yql/tests/sql/dq_file/part13/test.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import pytest
import yatest

from dq_file import run_test
from dq_file import run_test, DATA_PATH
from test_utils import pytest_generate_tests_for_part
from yql_utils import pytest_get_current_part


def pytest_generate_tests(metafunc):
current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
return pytest_generate_tests_for_part(metafunc, current_part, part_count)
return pytest_generate_tests_for_part(metafunc, current_part, part_count, data_path=DATA_PATH)


@pytest.mark.parametrize('what', ['Results', 'ForceBlocks'])
Expand Down
4 changes: 2 additions & 2 deletions ydb/library/yql/tests/sql/dq_file/part14/test.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import pytest
import yatest

from dq_file import run_test
from dq_file import run_test, DATA_PATH
from test_utils import pytest_generate_tests_for_part
from yql_utils import pytest_get_current_part


def pytest_generate_tests(metafunc):
current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
return pytest_generate_tests_for_part(metafunc, current_part, part_count)
return pytest_generate_tests_for_part(metafunc, current_part, part_count, data_path=DATA_PATH)


@pytest.mark.parametrize('what', ['Results', 'ForceBlocks'])
Expand Down
4 changes: 2 additions & 2 deletions ydb/library/yql/tests/sql/dq_file/part15/test.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import pytest
import yatest

from dq_file import run_test
from dq_file import run_test, DATA_PATH
from test_utils import pytest_generate_tests_for_part
from yql_utils import pytest_get_current_part


def pytest_generate_tests(metafunc):
current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
return pytest_generate_tests_for_part(metafunc, current_part, part_count)
return pytest_generate_tests_for_part(metafunc, current_part, part_count, data_path=DATA_PATH)


@pytest.mark.parametrize('what', ['Results', 'ForceBlocks'])
Expand Down
4 changes: 2 additions & 2 deletions ydb/library/yql/tests/sql/dq_file/part16/test.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import pytest
import yatest

from dq_file import run_test
from dq_file import run_test, DATA_PATH
from test_utils import pytest_generate_tests_for_part
from yql_utils import pytest_get_current_part


def pytest_generate_tests(metafunc):
current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
return pytest_generate_tests_for_part(metafunc, current_part, part_count)
return pytest_generate_tests_for_part(metafunc, current_part, part_count, data_path=DATA_PATH)


@pytest.mark.parametrize('what', ['Results', 'ForceBlocks'])
Expand Down
4 changes: 2 additions & 2 deletions ydb/library/yql/tests/sql/dq_file/part17/test.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import pytest
import yatest

from dq_file import run_test
from dq_file import run_test, DATA_PATH
from test_utils import pytest_generate_tests_for_part
from yql_utils import pytest_get_current_part


def pytest_generate_tests(metafunc):
current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
return pytest_generate_tests_for_part(metafunc, current_part, part_count)
return pytest_generate_tests_for_part(metafunc, current_part, part_count, data_path=DATA_PATH)


@pytest.mark.parametrize('what', ['Results', 'ForceBlocks'])
Expand Down
4 changes: 2 additions & 2 deletions ydb/library/yql/tests/sql/dq_file/part18/test.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import pytest
import yatest

from dq_file import run_test
from dq_file import run_test, DATA_PATH
from test_utils import pytest_generate_tests_for_part
from yql_utils import pytest_get_current_part


def pytest_generate_tests(metafunc):
current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
return pytest_generate_tests_for_part(metafunc, current_part, part_count)
return pytest_generate_tests_for_part(metafunc, current_part, part_count, data_path=DATA_PATH)


@pytest.mark.parametrize('what', ['Results', 'ForceBlocks'])
Expand Down
4 changes: 2 additions & 2 deletions ydb/library/yql/tests/sql/dq_file/part19/test.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import pytest
import yatest

from dq_file import run_test
from dq_file import run_test, DATA_PATH
from test_utils import pytest_generate_tests_for_part
from yql_utils import pytest_get_current_part


def pytest_generate_tests(metafunc):
current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
return pytest_generate_tests_for_part(metafunc, current_part, part_count)
return pytest_generate_tests_for_part(metafunc, current_part, part_count, data_path=DATA_PATH)


@pytest.mark.parametrize('what', ['Results', 'ForceBlocks'])
Expand Down
4 changes: 2 additions & 2 deletions ydb/library/yql/tests/sql/dq_file/part2/test.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import pytest
import yatest

from dq_file import run_test
from dq_file import run_test, DATA_PATH
from test_utils import pytest_generate_tests_for_part
from yql_utils import pytest_get_current_part


def pytest_generate_tests(metafunc):
current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
return pytest_generate_tests_for_part(metafunc, current_part, part_count)
return pytest_generate_tests_for_part(metafunc, current_part, part_count, data_path=DATA_PATH)


@pytest.mark.parametrize('what', ['Results', 'ForceBlocks'])
Expand Down
4 changes: 2 additions & 2 deletions ydb/library/yql/tests/sql/dq_file/part3/test.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import pytest
import yatest

from dq_file import run_test
from dq_file import run_test, DATA_PATH
from test_utils import pytest_generate_tests_for_part
from yql_utils import pytest_get_current_part


def pytest_generate_tests(metafunc):
current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
return pytest_generate_tests_for_part(metafunc, current_part, part_count)
return pytest_generate_tests_for_part(metafunc, current_part, part_count, data_path=DATA_PATH)


@pytest.mark.parametrize('what', ['Results', 'ForceBlocks'])
Expand Down
4 changes: 2 additions & 2 deletions ydb/library/yql/tests/sql/dq_file/part4/test.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import pytest
import yatest

from dq_file import run_test
from dq_file import run_test, DATA_PATH
from test_utils import pytest_generate_tests_for_part
from yql_utils import pytest_get_current_part


def pytest_generate_tests(metafunc):
current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
return pytest_generate_tests_for_part(metafunc, current_part, part_count)
return pytest_generate_tests_for_part(metafunc, current_part, part_count, data_path=DATA_PATH)


@pytest.mark.parametrize('what', ['Results', 'ForceBlocks'])
Expand Down
4 changes: 2 additions & 2 deletions ydb/library/yql/tests/sql/dq_file/part5/test.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import pytest
import yatest

from dq_file import run_test
from dq_file import run_test, DATA_PATH
from test_utils import pytest_generate_tests_for_part
from yql_utils import pytest_get_current_part


def pytest_generate_tests(metafunc):
current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
return pytest_generate_tests_for_part(metafunc, current_part, part_count)
return pytest_generate_tests_for_part(metafunc, current_part, part_count, data_path=DATA_PATH)


@pytest.mark.parametrize('what', ['Results', 'ForceBlocks'])
Expand Down
4 changes: 2 additions & 2 deletions ydb/library/yql/tests/sql/dq_file/part6/test.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import pytest
import yatest

from dq_file import run_test
from dq_file import run_test, DATA_PATH
from test_utils import pytest_generate_tests_for_part
from yql_utils import pytest_get_current_part


def pytest_generate_tests(metafunc):
current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
return pytest_generate_tests_for_part(metafunc, current_part, part_count)
return pytest_generate_tests_for_part(metafunc, current_part, part_count, data_path=DATA_PATH)


@pytest.mark.parametrize('what', ['Results', 'ForceBlocks'])
Expand Down
4 changes: 2 additions & 2 deletions ydb/library/yql/tests/sql/dq_file/part7/test.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import pytest
import yatest

from dq_file import run_test
from dq_file import run_test, DATA_PATH
from test_utils import pytest_generate_tests_for_part
from yql_utils import pytest_get_current_part


def pytest_generate_tests(metafunc):
current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
return pytest_generate_tests_for_part(metafunc, current_part, part_count)
return pytest_generate_tests_for_part(metafunc, current_part, part_count, data_path=DATA_PATH)


@pytest.mark.parametrize('what', ['Results', 'ForceBlocks'])
Expand Down
4 changes: 2 additions & 2 deletions ydb/library/yql/tests/sql/dq_file/part8/test.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import pytest
import yatest

from dq_file import run_test
from dq_file import run_test, DATA_PATH
from test_utils import pytest_generate_tests_for_part
from yql_utils import pytest_get_current_part


def pytest_generate_tests(metafunc):
current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
return pytest_generate_tests_for_part(metafunc, current_part, part_count)
return pytest_generate_tests_for_part(metafunc, current_part, part_count, data_path=DATA_PATH)


@pytest.mark.parametrize('what', ['Results', 'ForceBlocks'])
Expand Down
4 changes: 2 additions & 2 deletions ydb/library/yql/tests/sql/dq_file/part9/test.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import pytest
import yatest

from dq_file import run_test
from dq_file import run_test, DATA_PATH
from test_utils import pytest_generate_tests_for_part
from yql_utils import pytest_get_current_part


def pytest_generate_tests(metafunc):
current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
return pytest_generate_tests_for_part(metafunc, current_part, part_count)
return pytest_generate_tests_for_part(metafunc, current_part, part_count, data_path=DATA_PATH)


@pytest.mark.parametrize('what', ['Results', 'ForceBlocks'])
Expand Down
Loading
Loading