aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralmishev <almishev@yandex-team.com>2025-04-21 20:00:50 +0300
committeralmishev <almishev@yandex-team.com>2025-04-21 20:56:34 +0300
commit6b17ad8c52e16d0088291781e1b5a9e28d028b9b (patch)
tree8094d7dfadf75c12f8172446161c9bb0299a7d16
parent5e5f8b25a2c03c13a0c3592a1381ba4dac085d10 (diff)
downloadydb-6b17ad8c52e16d0088291781e1b5a9e28d028b9b.tar.gz
fix junit5-runner ForkSubtests: should distribute evenly tests in chunks
commit_hash:478736ce9fbf76b0b269d4ac39055a3989b92e7f
-rw-r--r--build/plugins/_dart_fields.py8
-rw-r--r--build/plugins/ytest.py1
-rw-r--r--build/ymake.core.conf12
3 files changed, 21 insertions, 0 deletions
diff --git a/build/plugins/_dart_fields.py b/build/plugins/_dart_fields.py
index 37db4c5a435..bf2a337ca0b 100644
--- a/build/plugins/_dart_fields.py
+++ b/build/plugins/_dart_fields.py
@@ -1343,6 +1343,14 @@ class TestPartition:
return {cls.KEY: unit.get("TEST_PARTITION")}
+class TestExperimentalFork:
+ KEY = 'TEST_EXPERIMENTAL_FORK'
+
+ @classmethod
+ def value(cls, unit, flat_args, spec_args):
+ return {cls.KEY: unit.get("TEST_EXPERIMENTAL_FORK")}
+
+
class TestRecipes:
KEY = 'TEST-RECIPES'
diff --git a/build/plugins/ytest.py b/build/plugins/ytest.py
index e65d1e65d47..48a708ed709 100644
--- a/build/plugins/ytest.py
+++ b/build/plugins/ytest.py
@@ -876,6 +876,7 @@ def onadd_pytest_bin(fields, unit, *args):
df.TestEnv.value,
df.TestData.java_test,
df.ForkMode.test_fork_mode,
+ df.TestExperimentalFork.value,
df.SplitFactor.from_unit,
df.CustomDependencies.test_depends_only,
df.Tag.from_macro_args_and_unit,
diff --git a/build/ymake.core.conf b/build/ymake.core.conf
index 9ab27e3edfe..6f9a3110e69 100644
--- a/build/ymake.core.conf
+++ b/build/ymake.core.conf
@@ -2763,6 +2763,18 @@ macro FORK_TEST_FILES() {
}
# tag:test
+TEST_EXPERIMENTAL_FORK=
+### @usage: EXPERIMENTAL_FORK()
+###
+### Only for java-tests: same as FORK_(SUB)TESTS(SEQUENTIAL) for other languages
+### Compatible with FORK_(SUB)TESTS.
+###
+### Documentation about the system test: https://wiki.yandex-team.ru/yatool/test/
+macro EXPERIMENTAL_FORK() {
+ SET(TEST_EXPERIMENTAL_FORK yes)
+}
+
+# tag:test
TEST_SIZE_NAME=SMALL
### @usage: SIZE(SMALL/MEDIUM/LARGE)
###