aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorudovichenko-r <rvu@ydb.tech>2023-12-13 17:29:31 +0300
committerudovichenko-r <rvu@ydb.tech>2023-12-13 19:43:02 +0300
commit0e3397eaf38c1a11d2411c75ef09da9c7413fa9c (patch)
tree59fe97bc784a1df2e75eb7a8cfcab8029c6d97a1
parent296bfa05cb0fd7a1dbf4e3ae37623896131a8d1a (diff)
downloadydb-0e3397eaf38c1a11d2411c75ef09da9c7413fa9c.tar.gz
[yql] test auto partition
-rw-r--r--ydb/library/yql/tests/common/test_framework/yql_utils.py12
-rw-r--r--ydb/library/yql/tests/s-expressions/yt_native_file/part0/test.py5
-rw-r--r--ydb/library/yql/tests/s-expressions/yt_native_file/part1/test.py5
-rw-r--r--ydb/library/yql/tests/s-expressions/yt_native_file/part2/test.py5
-rw-r--r--ydb/library/yql/tests/s-expressions/yt_native_file/part3/test.py5
-rw-r--r--ydb/library/yql/tests/s-expressions/yt_native_file/part4/test.py5
-rw-r--r--ydb/library/yql/tests/s-expressions/yt_native_file/part5/test.py5
-rw-r--r--ydb/library/yql/tests/s-expressions/yt_native_file/part6/test.py5
-rw-r--r--ydb/library/yql/tests/s-expressions/yt_native_file/part7/test.py5
-rw-r--r--ydb/library/yql/tests/s-expressions/yt_native_file/part8/test.py5
-rw-r--r--ydb/library/yql/tests/s-expressions/yt_native_file/part9/test.py5
-rw-r--r--ydb/library/yql/tests/sql/dq_file/part0/test.py5
-rw-r--r--ydb/library/yql/tests/sql/dq_file/part1/test.py5
-rw-r--r--ydb/library/yql/tests/sql/dq_file/part2/test.py5
-rw-r--r--ydb/library/yql/tests/sql/dq_file/part3/test.py5
-rw-r--r--ydb/library/yql/tests/sql/dq_file/part4/test.py5
-rw-r--r--ydb/library/yql/tests/sql/dq_file/part5/test.py5
-rw-r--r--ydb/library/yql/tests/sql/dq_file/part6/test.py5
-rw-r--r--ydb/library/yql/tests/sql/dq_file/part7/test.py5
-rw-r--r--ydb/library/yql/tests/sql/dq_file/part8/test.py5
-rw-r--r--ydb/library/yql/tests/sql/dq_file/part9/test.py5
-rw-r--r--ydb/library/yql/tests/sql/yt_native_file/part0/test.py5
-rw-r--r--ydb/library/yql/tests/sql/yt_native_file/part1/test.py5
-rw-r--r--ydb/library/yql/tests/sql/yt_native_file/part2/test.py5
-rw-r--r--ydb/library/yql/tests/sql/yt_native_file/part3/test.py5
-rw-r--r--ydb/library/yql/tests/sql/yt_native_file/part4/test.py5
-rw-r--r--ydb/library/yql/tests/sql/yt_native_file/part5/test.py5
-rw-r--r--ydb/library/yql/tests/sql/yt_native_file/part6/test.py5
-rw-r--r--ydb/library/yql/tests/sql/yt_native_file/part7/test.py5
-rw-r--r--ydb/library/yql/tests/sql/yt_native_file/part8/test.py5
-rw-r--r--ydb/library/yql/tests/sql/yt_native_file/part9/test.py5
31 files changed, 132 insertions, 30 deletions
diff --git a/ydb/library/yql/tests/common/test_framework/yql_utils.py b/ydb/library/yql/tests/common/test_framework/yql_utils.py
index dd5bc1423d..78b9d40899 100644
--- a/ydb/library/yql/tests/common/test_framework/yql_utils.py
+++ b/ydb/library/yql/tests/common/test_framework/yql_utils.py
@@ -877,6 +877,18 @@ def ansi_lexer_enabled(program):
return 'ansi_lexer' in program
+def pytest_get_current_part(path):
+ folder = os.path.dirname(path)
+ folder_name = os.path.basename(folder)
+ assert folder_name.startswith('part'), "Current folder is {}".format(folder_name)
+ current = int(folder_name[len('part'):])
+
+ parent = os.path.dirname(folder)
+ maxpart = max([int(part[len('part'):]) if part.startswith('part') else -1 for part in os.listdir(parent)])
+ assert maxpart > 0, "Cannot find parts in {}".format(parent)
+ return (current, 1 + maxpart)
+
+
class LoggingDowngrade(object):
def __init__(self, loggers, level=logging.CRITICAL):
diff --git a/ydb/library/yql/tests/s-expressions/yt_native_file/part0/test.py b/ydb/library/yql/tests/s-expressions/yt_native_file/part0/test.py
index 3ce5275d39..7882b72157 100644
--- a/ydb/library/yql/tests/s-expressions/yt_native_file/part0/test.py
+++ b/ydb/library/yql/tests/s-expressions/yt_native_file/part0/test.py
@@ -1,11 +1,14 @@
import pytest
+import yatest
from common_file import run_test
from common_test_tools import pytest_generate_tests_for_part
+from yql_utils import pytest_get_current_part
def pytest_generate_tests(metafunc):
- return pytest_generate_tests_for_part(metafunc, 0, 10)
+ current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
+ return pytest_generate_tests_for_part(metafunc, current_part, part_count)
@pytest.mark.parametrize('what', ['Results', 'Plan', 'Debug', 'RunOnOpt', 'ForceBlocks'])
diff --git a/ydb/library/yql/tests/s-expressions/yt_native_file/part1/test.py b/ydb/library/yql/tests/s-expressions/yt_native_file/part1/test.py
index a5286d1086..7882b72157 100644
--- a/ydb/library/yql/tests/s-expressions/yt_native_file/part1/test.py
+++ b/ydb/library/yql/tests/s-expressions/yt_native_file/part1/test.py
@@ -1,11 +1,14 @@
import pytest
+import yatest
from common_file import run_test
from common_test_tools import pytest_generate_tests_for_part
+from yql_utils import pytest_get_current_part
def pytest_generate_tests(metafunc):
- return pytest_generate_tests_for_part(metafunc, 1, 10)
+ current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
+ return pytest_generate_tests_for_part(metafunc, current_part, part_count)
@pytest.mark.parametrize('what', ['Results', 'Plan', 'Debug', 'RunOnOpt', 'ForceBlocks'])
diff --git a/ydb/library/yql/tests/s-expressions/yt_native_file/part2/test.py b/ydb/library/yql/tests/s-expressions/yt_native_file/part2/test.py
index 979aec48e3..7882b72157 100644
--- a/ydb/library/yql/tests/s-expressions/yt_native_file/part2/test.py
+++ b/ydb/library/yql/tests/s-expressions/yt_native_file/part2/test.py
@@ -1,11 +1,14 @@
import pytest
+import yatest
from common_file import run_test
from common_test_tools import pytest_generate_tests_for_part
+from yql_utils import pytest_get_current_part
def pytest_generate_tests(metafunc):
- return pytest_generate_tests_for_part(metafunc, 2, 10)
+ current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
+ return pytest_generate_tests_for_part(metafunc, current_part, part_count)
@pytest.mark.parametrize('what', ['Results', 'Plan', 'Debug', 'RunOnOpt', 'ForceBlocks'])
diff --git a/ydb/library/yql/tests/s-expressions/yt_native_file/part3/test.py b/ydb/library/yql/tests/s-expressions/yt_native_file/part3/test.py
index 828fab27e8..7882b72157 100644
--- a/ydb/library/yql/tests/s-expressions/yt_native_file/part3/test.py
+++ b/ydb/library/yql/tests/s-expressions/yt_native_file/part3/test.py
@@ -1,11 +1,14 @@
import pytest
+import yatest
from common_file import run_test
from common_test_tools import pytest_generate_tests_for_part
+from yql_utils import pytest_get_current_part
def pytest_generate_tests(metafunc):
- return pytest_generate_tests_for_part(metafunc, 3, 10)
+ current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
+ return pytest_generate_tests_for_part(metafunc, current_part, part_count)
@pytest.mark.parametrize('what', ['Results', 'Plan', 'Debug', 'RunOnOpt', 'ForceBlocks'])
diff --git a/ydb/library/yql/tests/s-expressions/yt_native_file/part4/test.py b/ydb/library/yql/tests/s-expressions/yt_native_file/part4/test.py
index a6069624ca..7882b72157 100644
--- a/ydb/library/yql/tests/s-expressions/yt_native_file/part4/test.py
+++ b/ydb/library/yql/tests/s-expressions/yt_native_file/part4/test.py
@@ -1,11 +1,14 @@
import pytest
+import yatest
from common_file import run_test
from common_test_tools import pytest_generate_tests_for_part
+from yql_utils import pytest_get_current_part
def pytest_generate_tests(metafunc):
- return pytest_generate_tests_for_part(metafunc, 4, 10)
+ current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
+ return pytest_generate_tests_for_part(metafunc, current_part, part_count)
@pytest.mark.parametrize('what', ['Results', 'Plan', 'Debug', 'RunOnOpt', 'ForceBlocks'])
diff --git a/ydb/library/yql/tests/s-expressions/yt_native_file/part5/test.py b/ydb/library/yql/tests/s-expressions/yt_native_file/part5/test.py
index cc01bae28f..7882b72157 100644
--- a/ydb/library/yql/tests/s-expressions/yt_native_file/part5/test.py
+++ b/ydb/library/yql/tests/s-expressions/yt_native_file/part5/test.py
@@ -1,11 +1,14 @@
import pytest
+import yatest
from common_file import run_test
from common_test_tools import pytest_generate_tests_for_part
+from yql_utils import pytest_get_current_part
def pytest_generate_tests(metafunc):
- return pytest_generate_tests_for_part(metafunc, 5, 10)
+ current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
+ return pytest_generate_tests_for_part(metafunc, current_part, part_count)
@pytest.mark.parametrize('what', ['Results', 'Plan', 'Debug', 'RunOnOpt', 'ForceBlocks'])
diff --git a/ydb/library/yql/tests/s-expressions/yt_native_file/part6/test.py b/ydb/library/yql/tests/s-expressions/yt_native_file/part6/test.py
index 78299bb6b1..7882b72157 100644
--- a/ydb/library/yql/tests/s-expressions/yt_native_file/part6/test.py
+++ b/ydb/library/yql/tests/s-expressions/yt_native_file/part6/test.py
@@ -1,11 +1,14 @@
import pytest
+import yatest
from common_file import run_test
from common_test_tools import pytest_generate_tests_for_part
+from yql_utils import pytest_get_current_part
def pytest_generate_tests(metafunc):
- return pytest_generate_tests_for_part(metafunc, 6, 10)
+ current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
+ return pytest_generate_tests_for_part(metafunc, current_part, part_count)
@pytest.mark.parametrize('what', ['Results', 'Plan', 'Debug', 'RunOnOpt', 'ForceBlocks'])
diff --git a/ydb/library/yql/tests/s-expressions/yt_native_file/part7/test.py b/ydb/library/yql/tests/s-expressions/yt_native_file/part7/test.py
index a16a4bf8d3..7882b72157 100644
--- a/ydb/library/yql/tests/s-expressions/yt_native_file/part7/test.py
+++ b/ydb/library/yql/tests/s-expressions/yt_native_file/part7/test.py
@@ -1,11 +1,14 @@
import pytest
+import yatest
from common_file import run_test
from common_test_tools import pytest_generate_tests_for_part
+from yql_utils import pytest_get_current_part
def pytest_generate_tests(metafunc):
- return pytest_generate_tests_for_part(metafunc, 7, 10)
+ current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
+ return pytest_generate_tests_for_part(metafunc, current_part, part_count)
@pytest.mark.parametrize('what', ['Results', 'Plan', 'Debug', 'RunOnOpt', 'ForceBlocks'])
diff --git a/ydb/library/yql/tests/s-expressions/yt_native_file/part8/test.py b/ydb/library/yql/tests/s-expressions/yt_native_file/part8/test.py
index e2257fc074..7882b72157 100644
--- a/ydb/library/yql/tests/s-expressions/yt_native_file/part8/test.py
+++ b/ydb/library/yql/tests/s-expressions/yt_native_file/part8/test.py
@@ -1,11 +1,14 @@
import pytest
+import yatest
from common_file import run_test
from common_test_tools import pytest_generate_tests_for_part
+from yql_utils import pytest_get_current_part
def pytest_generate_tests(metafunc):
- return pytest_generate_tests_for_part(metafunc, 8, 10)
+ current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
+ return pytest_generate_tests_for_part(metafunc, current_part, part_count)
@pytest.mark.parametrize('what', ['Results', 'Plan', 'Debug', 'RunOnOpt', 'ForceBlocks'])
diff --git a/ydb/library/yql/tests/s-expressions/yt_native_file/part9/test.py b/ydb/library/yql/tests/s-expressions/yt_native_file/part9/test.py
index 5a99d0671a..7882b72157 100644
--- a/ydb/library/yql/tests/s-expressions/yt_native_file/part9/test.py
+++ b/ydb/library/yql/tests/s-expressions/yt_native_file/part9/test.py
@@ -1,11 +1,14 @@
import pytest
+import yatest
from common_file import run_test
from common_test_tools import pytest_generate_tests_for_part
+from yql_utils import pytest_get_current_part
def pytest_generate_tests(metafunc):
- return pytest_generate_tests_for_part(metafunc, 9, 10)
+ current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
+ return pytest_generate_tests_for_part(metafunc, current_part, part_count)
@pytest.mark.parametrize('what', ['Results', 'Plan', 'Debug', 'RunOnOpt', 'ForceBlocks'])
diff --git a/ydb/library/yql/tests/sql/dq_file/part0/test.py b/ydb/library/yql/tests/sql/dq_file/part0/test.py
index 5214b65d61..c4032c5c5d 100644
--- a/ydb/library/yql/tests/sql/dq_file/part0/test.py
+++ b/ydb/library/yql/tests/sql/dq_file/part0/test.py
@@ -1,11 +1,14 @@
import pytest
+import yatest
from dq_file import run_test
from utils import pytest_generate_tests_for_part
+from yql_utils import pytest_get_current_part
def pytest_generate_tests(metafunc):
- return pytest_generate_tests_for_part(metafunc, 0, 10)
+ current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
+ return pytest_generate_tests_for_part(metafunc, current_part, part_count)
@pytest.mark.parametrize('what', ['Results', 'Plan', 'Debug', 'Analyze', 'ForceBlocks'])
diff --git a/ydb/library/yql/tests/sql/dq_file/part1/test.py b/ydb/library/yql/tests/sql/dq_file/part1/test.py
index a26fa25577..c4032c5c5d 100644
--- a/ydb/library/yql/tests/sql/dq_file/part1/test.py
+++ b/ydb/library/yql/tests/sql/dq_file/part1/test.py
@@ -1,11 +1,14 @@
import pytest
+import yatest
from dq_file import run_test
from utils import pytest_generate_tests_for_part
+from yql_utils import pytest_get_current_part
def pytest_generate_tests(metafunc):
- return pytest_generate_tests_for_part(metafunc, 1, 10)
+ current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
+ return pytest_generate_tests_for_part(metafunc, current_part, part_count)
@pytest.mark.parametrize('what', ['Results', 'Plan', 'Debug', 'Analyze', 'ForceBlocks'])
diff --git a/ydb/library/yql/tests/sql/dq_file/part2/test.py b/ydb/library/yql/tests/sql/dq_file/part2/test.py
index 51a0e28e08..c4032c5c5d 100644
--- a/ydb/library/yql/tests/sql/dq_file/part2/test.py
+++ b/ydb/library/yql/tests/sql/dq_file/part2/test.py
@@ -1,11 +1,14 @@
import pytest
+import yatest
from dq_file import run_test
from utils import pytest_generate_tests_for_part
+from yql_utils import pytest_get_current_part
def pytest_generate_tests(metafunc):
- return pytest_generate_tests_for_part(metafunc, 2, 10)
+ current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
+ return pytest_generate_tests_for_part(metafunc, current_part, part_count)
@pytest.mark.parametrize('what', ['Results', 'Plan', 'Debug', 'Analyze', 'ForceBlocks'])
diff --git a/ydb/library/yql/tests/sql/dq_file/part3/test.py b/ydb/library/yql/tests/sql/dq_file/part3/test.py
index 0fcb2ca4dd..c4032c5c5d 100644
--- a/ydb/library/yql/tests/sql/dq_file/part3/test.py
+++ b/ydb/library/yql/tests/sql/dq_file/part3/test.py
@@ -1,11 +1,14 @@
import pytest
+import yatest
from dq_file import run_test
from utils import pytest_generate_tests_for_part
+from yql_utils import pytest_get_current_part
def pytest_generate_tests(metafunc):
- return pytest_generate_tests_for_part(metafunc, 3, 10)
+ current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
+ return pytest_generate_tests_for_part(metafunc, current_part, part_count)
@pytest.mark.parametrize('what', ['Results', 'Plan', 'Debug', 'Analyze', 'ForceBlocks'])
diff --git a/ydb/library/yql/tests/sql/dq_file/part4/test.py b/ydb/library/yql/tests/sql/dq_file/part4/test.py
index cc3f0ed8f3..c4032c5c5d 100644
--- a/ydb/library/yql/tests/sql/dq_file/part4/test.py
+++ b/ydb/library/yql/tests/sql/dq_file/part4/test.py
@@ -1,11 +1,14 @@
import pytest
+import yatest
from dq_file import run_test
from utils import pytest_generate_tests_for_part
+from yql_utils import pytest_get_current_part
def pytest_generate_tests(metafunc):
- return pytest_generate_tests_for_part(metafunc, 4, 10)
+ current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
+ return pytest_generate_tests_for_part(metafunc, current_part, part_count)
@pytest.mark.parametrize('what', ['Results', 'Plan', 'Debug', 'Analyze', 'ForceBlocks'])
diff --git a/ydb/library/yql/tests/sql/dq_file/part5/test.py b/ydb/library/yql/tests/sql/dq_file/part5/test.py
index 82f1463dff..c4032c5c5d 100644
--- a/ydb/library/yql/tests/sql/dq_file/part5/test.py
+++ b/ydb/library/yql/tests/sql/dq_file/part5/test.py
@@ -1,11 +1,14 @@
import pytest
+import yatest
from dq_file import run_test
from utils import pytest_generate_tests_for_part
+from yql_utils import pytest_get_current_part
def pytest_generate_tests(metafunc):
- return pytest_generate_tests_for_part(metafunc, 5, 10)
+ current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
+ return pytest_generate_tests_for_part(metafunc, current_part, part_count)
@pytest.mark.parametrize('what', ['Results', 'Plan', 'Debug', 'Analyze', 'ForceBlocks'])
diff --git a/ydb/library/yql/tests/sql/dq_file/part6/test.py b/ydb/library/yql/tests/sql/dq_file/part6/test.py
index 983f3dbf4a..c4032c5c5d 100644
--- a/ydb/library/yql/tests/sql/dq_file/part6/test.py
+++ b/ydb/library/yql/tests/sql/dq_file/part6/test.py
@@ -1,11 +1,14 @@
import pytest
+import yatest
from dq_file import run_test
from utils import pytest_generate_tests_for_part
+from yql_utils import pytest_get_current_part
def pytest_generate_tests(metafunc):
- return pytest_generate_tests_for_part(metafunc, 6, 10)
+ current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
+ return pytest_generate_tests_for_part(metafunc, current_part, part_count)
@pytest.mark.parametrize('what', ['Results', 'Plan', 'Debug', 'Analyze', 'ForceBlocks'])
diff --git a/ydb/library/yql/tests/sql/dq_file/part7/test.py b/ydb/library/yql/tests/sql/dq_file/part7/test.py
index 408231a4c4..c4032c5c5d 100644
--- a/ydb/library/yql/tests/sql/dq_file/part7/test.py
+++ b/ydb/library/yql/tests/sql/dq_file/part7/test.py
@@ -1,11 +1,14 @@
import pytest
+import yatest
from dq_file import run_test
from utils import pytest_generate_tests_for_part
+from yql_utils import pytest_get_current_part
def pytest_generate_tests(metafunc):
- return pytest_generate_tests_for_part(metafunc, 7, 10)
+ current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
+ return pytest_generate_tests_for_part(metafunc, current_part, part_count)
@pytest.mark.parametrize('what', ['Results', 'Plan', 'Debug', 'Analyze', 'ForceBlocks'])
diff --git a/ydb/library/yql/tests/sql/dq_file/part8/test.py b/ydb/library/yql/tests/sql/dq_file/part8/test.py
index 3c192bb252..c4032c5c5d 100644
--- a/ydb/library/yql/tests/sql/dq_file/part8/test.py
+++ b/ydb/library/yql/tests/sql/dq_file/part8/test.py
@@ -1,11 +1,14 @@
import pytest
+import yatest
from dq_file import run_test
from utils import pytest_generate_tests_for_part
+from yql_utils import pytest_get_current_part
def pytest_generate_tests(metafunc):
- return pytest_generate_tests_for_part(metafunc, 8, 10)
+ current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
+ return pytest_generate_tests_for_part(metafunc, current_part, part_count)
@pytest.mark.parametrize('what', ['Results', 'Plan', 'Debug', 'Analyze', 'ForceBlocks'])
diff --git a/ydb/library/yql/tests/sql/dq_file/part9/test.py b/ydb/library/yql/tests/sql/dq_file/part9/test.py
index 049eebd473..c4032c5c5d 100644
--- a/ydb/library/yql/tests/sql/dq_file/part9/test.py
+++ b/ydb/library/yql/tests/sql/dq_file/part9/test.py
@@ -1,11 +1,14 @@
import pytest
+import yatest
from dq_file import run_test
from utils import pytest_generate_tests_for_part
+from yql_utils import pytest_get_current_part
def pytest_generate_tests(metafunc):
- return pytest_generate_tests_for_part(metafunc, 9, 10)
+ current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
+ return pytest_generate_tests_for_part(metafunc, current_part, part_count)
@pytest.mark.parametrize('what', ['Results', 'Plan', 'Debug', 'Analyze', 'ForceBlocks'])
diff --git a/ydb/library/yql/tests/sql/yt_native_file/part0/test.py b/ydb/library/yql/tests/sql/yt_native_file/part0/test.py
index 1b7d9e3dfc..e4f9af06b1 100644
--- a/ydb/library/yql/tests/sql/yt_native_file/part0/test.py
+++ b/ydb/library/yql/tests/sql/yt_native_file/part0/test.py
@@ -1,11 +1,14 @@
import pytest
+import yatest
from yt_file import run_test
from utils import pytest_generate_tests_for_part
+from yql_utils import pytest_get_current_part
def pytest_generate_tests(metafunc):
- return pytest_generate_tests_for_part(metafunc, 0, 10)
+ current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
+ return pytest_generate_tests_for_part(metafunc, current_part, part_count)
@pytest.mark.parametrize('what', ['Results', 'Plan', 'Debug', 'RunOnOpt', 'Peephole', 'Lineage', 'ForceBlocks'])
diff --git a/ydb/library/yql/tests/sql/yt_native_file/part1/test.py b/ydb/library/yql/tests/sql/yt_native_file/part1/test.py
index 3a3e4bf92b..e4f9af06b1 100644
--- a/ydb/library/yql/tests/sql/yt_native_file/part1/test.py
+++ b/ydb/library/yql/tests/sql/yt_native_file/part1/test.py
@@ -1,11 +1,14 @@
import pytest
+import yatest
from yt_file import run_test
from utils import pytest_generate_tests_for_part
+from yql_utils import pytest_get_current_part
def pytest_generate_tests(metafunc):
- return pytest_generate_tests_for_part(metafunc, 1, 10)
+ current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
+ return pytest_generate_tests_for_part(metafunc, current_part, part_count)
@pytest.mark.parametrize('what', ['Results', 'Plan', 'Debug', 'RunOnOpt', 'Peephole', 'Lineage', 'ForceBlocks'])
diff --git a/ydb/library/yql/tests/sql/yt_native_file/part2/test.py b/ydb/library/yql/tests/sql/yt_native_file/part2/test.py
index 570ad4e592..e4f9af06b1 100644
--- a/ydb/library/yql/tests/sql/yt_native_file/part2/test.py
+++ b/ydb/library/yql/tests/sql/yt_native_file/part2/test.py
@@ -1,11 +1,14 @@
import pytest
+import yatest
from yt_file import run_test
from utils import pytest_generate_tests_for_part
+from yql_utils import pytest_get_current_part
def pytest_generate_tests(metafunc):
- return pytest_generate_tests_for_part(metafunc, 2, 10)
+ current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
+ return pytest_generate_tests_for_part(metafunc, current_part, part_count)
@pytest.mark.parametrize('what', ['Results', 'Plan', 'Debug', 'RunOnOpt', 'Peephole', 'Lineage', 'ForceBlocks'])
diff --git a/ydb/library/yql/tests/sql/yt_native_file/part3/test.py b/ydb/library/yql/tests/sql/yt_native_file/part3/test.py
index ce180a385b..e4f9af06b1 100644
--- a/ydb/library/yql/tests/sql/yt_native_file/part3/test.py
+++ b/ydb/library/yql/tests/sql/yt_native_file/part3/test.py
@@ -1,11 +1,14 @@
import pytest
+import yatest
from yt_file import run_test
from utils import pytest_generate_tests_for_part
+from yql_utils import pytest_get_current_part
def pytest_generate_tests(metafunc):
- return pytest_generate_tests_for_part(metafunc, 3, 10)
+ current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
+ return pytest_generate_tests_for_part(metafunc, current_part, part_count)
@pytest.mark.parametrize('what', ['Results', 'Plan', 'Debug', 'RunOnOpt', 'Peephole', 'Lineage', 'ForceBlocks'])
diff --git a/ydb/library/yql/tests/sql/yt_native_file/part4/test.py b/ydb/library/yql/tests/sql/yt_native_file/part4/test.py
index c31302fd05..e4f9af06b1 100644
--- a/ydb/library/yql/tests/sql/yt_native_file/part4/test.py
+++ b/ydb/library/yql/tests/sql/yt_native_file/part4/test.py
@@ -1,11 +1,14 @@
import pytest
+import yatest
from yt_file import run_test
from utils import pytest_generate_tests_for_part
+from yql_utils import pytest_get_current_part
def pytest_generate_tests(metafunc):
- return pytest_generate_tests_for_part(metafunc, 4, 10)
+ current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
+ return pytest_generate_tests_for_part(metafunc, current_part, part_count)
@pytest.mark.parametrize('what', ['Results', 'Plan', 'Debug', 'RunOnOpt', 'Peephole', 'Lineage', 'ForceBlocks'])
diff --git a/ydb/library/yql/tests/sql/yt_native_file/part5/test.py b/ydb/library/yql/tests/sql/yt_native_file/part5/test.py
index 09d5994445..e4f9af06b1 100644
--- a/ydb/library/yql/tests/sql/yt_native_file/part5/test.py
+++ b/ydb/library/yql/tests/sql/yt_native_file/part5/test.py
@@ -1,11 +1,14 @@
import pytest
+import yatest
from yt_file import run_test
from utils import pytest_generate_tests_for_part
+from yql_utils import pytest_get_current_part
def pytest_generate_tests(metafunc):
- return pytest_generate_tests_for_part(metafunc, 5, 10)
+ current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
+ return pytest_generate_tests_for_part(metafunc, current_part, part_count)
@pytest.mark.parametrize('what', ['Results', 'Plan', 'Debug', 'RunOnOpt', 'Peephole', 'Lineage', 'ForceBlocks'])
diff --git a/ydb/library/yql/tests/sql/yt_native_file/part6/test.py b/ydb/library/yql/tests/sql/yt_native_file/part6/test.py
index 60c167f5ca..e4f9af06b1 100644
--- a/ydb/library/yql/tests/sql/yt_native_file/part6/test.py
+++ b/ydb/library/yql/tests/sql/yt_native_file/part6/test.py
@@ -1,11 +1,14 @@
import pytest
+import yatest
from yt_file import run_test
from utils import pytest_generate_tests_for_part
+from yql_utils import pytest_get_current_part
def pytest_generate_tests(metafunc):
- return pytest_generate_tests_for_part(metafunc, 6, 10)
+ current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
+ return pytest_generate_tests_for_part(metafunc, current_part, part_count)
@pytest.mark.parametrize('what', ['Results', 'Plan', 'Debug', 'RunOnOpt', 'Peephole', 'Lineage', 'ForceBlocks'])
diff --git a/ydb/library/yql/tests/sql/yt_native_file/part7/test.py b/ydb/library/yql/tests/sql/yt_native_file/part7/test.py
index cb44b00b0e..e4f9af06b1 100644
--- a/ydb/library/yql/tests/sql/yt_native_file/part7/test.py
+++ b/ydb/library/yql/tests/sql/yt_native_file/part7/test.py
@@ -1,11 +1,14 @@
import pytest
+import yatest
from yt_file import run_test
from utils import pytest_generate_tests_for_part
+from yql_utils import pytest_get_current_part
def pytest_generate_tests(metafunc):
- return pytest_generate_tests_for_part(metafunc, 7, 10)
+ current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
+ return pytest_generate_tests_for_part(metafunc, current_part, part_count)
@pytest.mark.parametrize('what', ['Results', 'Plan', 'Debug', 'RunOnOpt', 'Peephole', 'Lineage', 'ForceBlocks'])
diff --git a/ydb/library/yql/tests/sql/yt_native_file/part8/test.py b/ydb/library/yql/tests/sql/yt_native_file/part8/test.py
index 91d91131d4..e4f9af06b1 100644
--- a/ydb/library/yql/tests/sql/yt_native_file/part8/test.py
+++ b/ydb/library/yql/tests/sql/yt_native_file/part8/test.py
@@ -1,11 +1,14 @@
import pytest
+import yatest
from yt_file import run_test
from utils import pytest_generate_tests_for_part
+from yql_utils import pytest_get_current_part
def pytest_generate_tests(metafunc):
- return pytest_generate_tests_for_part(metafunc, 8, 10)
+ current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
+ return pytest_generate_tests_for_part(metafunc, current_part, part_count)
@pytest.mark.parametrize('what', ['Results', 'Plan', 'Debug', 'RunOnOpt', 'Peephole', 'Lineage', 'ForceBlocks'])
diff --git a/ydb/library/yql/tests/sql/yt_native_file/part9/test.py b/ydb/library/yql/tests/sql/yt_native_file/part9/test.py
index 71e6214040..e4f9af06b1 100644
--- a/ydb/library/yql/tests/sql/yt_native_file/part9/test.py
+++ b/ydb/library/yql/tests/sql/yt_native_file/part9/test.py
@@ -1,11 +1,14 @@
import pytest
+import yatest
from yt_file import run_test
from utils import pytest_generate_tests_for_part
+from yql_utils import pytest_get_current_part
def pytest_generate_tests(metafunc):
- return pytest_generate_tests_for_part(metafunc, 9, 10)
+ current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
+ return pytest_generate_tests_for_part(metafunc, current_part, part_count)
@pytest.mark.parametrize('what', ['Results', 'Plan', 'Debug', 'RunOnOpt', 'Peephole', 'Lineage', 'ForceBlocks'])