Skip to content

Commit ededb52

Browse files
committed
ci: new config for ya tests muting
1 parent f68eb91 commit ededb52

File tree

3 files changed

+48
-33
lines changed

3 files changed

+48
-33
lines changed

.github/actions/test_ya/action.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,7 @@ runs:
253253
shell: bash
254254
run: |
255255
.github/scripts/tests/transform-ya-junit.py -i \
256-
--mu .github/config/muted_test.txt \
257-
--mf .github/config/muted_functest.txt \
256+
-m .github/config/muted_ya.txt \
258257
--ya-out "$OUT_DIR" \
259258
--log-url-prefix "$S3_URL_PREFIX/logs/" \
260259
--log-out-dir "$ARTIFACTS_DIR/logs/" \

.github/config/muted_ya.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
ydb/core/blobstorage/pdisk/ut TSectorMap.*
2+
ydb/core/blobstorage/ut_blobstorage Defragmentation.DoesItWork
3+
ydb/core/blobstorage/ut_blobstorage SpaceCheckForDiskReassign.*
4+
ydb/core/blobstorage/ut_blobstorage VDiskAssimilation.Test
5+
ydb/core/blobstorage/ut_blobstorage [6/10]*
6+
ydb/core/client/ut TClientTest.FollowerOfflineBoot
7+
ydb/core/kqp/ut/federated_query/generic *
8+
ydb/core/tx/columnshard/ut_schema TColumnShardTestSchema.ForgetAfterFail
9+
ydb/core/tx/columnshard/ut_schema TColumnShardTestSchema.RebootForgetAfterFail
10+
ydb/library/yql/sql/pg/ut PgSqlParsingAutoparam.AutoParamValues_DifferentTypes
11+
ydb/services/ydb/sdk_sessions_pool_ut YdbSdkSessionsPool.StressTestSync10
12+
ydb/tests/fq/s3 *
13+
ydb/tests/fq/yds test_metrics_cleanup.py.TestCleanup.test_cleanup[v1]
14+
ydb/tests/functional/audit *
15+
ydb/tests/functional/clickbench test.py.test_plans*
16+
ydb/tests/functional/kqp/kqp_query_session KqpQuerySession.NoLocalAttach
17+
ydb/tests/functional/postgresql test_postgres.py.TestPostgresSuite.test_postgres_suite
18+
ydb/tests/functional/tenants test_dynamic_tenants.py.*
19+
ydb/tests/functional/tenants test_storage_config.py.TestStorageConfig.*
20+
ydb/tests/functional/tenants test_tenants.py.*

.github/scripts/tests/transform-ya-junit.py

Lines changed: 27 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -17,34 +17,34 @@ def log_print(*args, **kwargs):
1717
class YaMuteCheck:
1818
def __init__(self):
1919
self.regexps = set()
20+
self.regexps = []
2021

21-
def add_unittest(self, fn):
22+
def load(self, fn):
2223
with open(fn, "r") as fp:
2324
for line in fp:
2425
line = line.strip()
25-
path, rest = line.split("/", maxsplit=1)
26-
path = path.replace("-", "/")
27-
rest = rest.replace("::", ".")
28-
self.populate(f"{path}/{rest}")
29-
30-
def add_functest(self, fn):
31-
with open(fn, "r") as fp:
32-
for line in fp:
33-
line = line.strip()
34-
line = line.replace("::", ".")
35-
self.populate(line)
36-
37-
def populate(self, line):
38-
pattern = pattern_to_re(line)
39-
40-
try:
41-
self.regexps.add(re.compile(pattern))
42-
except re.error:
43-
log_print(f"Unable to compile regex {pattern!r}")
44-
45-
def __call__(self, suitename, testname):
46-
for r in self.regexps:
47-
if r.match(f"{suitename}/{testname}"):
26+
try:
27+
testsuite, testcase = line.split(" ", maxsplit=1)
28+
except ValueError:
29+
log_print(f"SKIP INVALID MUTE CONFIG LINE: {line!r}")
30+
continue
31+
self.populate(testsuite, testcase)
32+
33+
def populate(self, testsuite, testcase):
34+
check = []
35+
36+
for p in (pattern_to_re(testsuite), pattern_to_re(testcase)):
37+
try:
38+
check.append(re.compile(p))
39+
except re.error:
40+
log_print(f"Unable to compile regex {p!r}")
41+
return
42+
43+
self.regexps.append(tuple(check))
44+
45+
def __call__(self, suite_name, test_name):
46+
for ps, pt in self.regexps:
47+
if ps.match(suite_name) and pt.match(test_name):
4848
return True
4949
return False
5050

@@ -176,8 +176,7 @@ def main():
176176
parser.add_argument(
177177
"-i", action="store_true", dest="save_inplace", default=False, help="modify input file in-place"
178178
)
179-
parser.add_argument("--mu", help="unittest mute config")
180-
parser.add_argument("--mf", help="functional test mute config")
179+
parser.add_argument("-m", help="muted test list")
181180
parser.add_argument("--log-url-prefix", default="./", help="url prefix for logs")
182181
parser.add_argument("--log-out-dir", help="symlink logs to specific directory")
183182
parser.add_argument(
@@ -194,11 +193,8 @@ def main():
194193

195194
mute_check = YaMuteCheck()
196195

197-
if args.mu:
198-
mute_check.add_unittest(args.mu)
199-
200-
if args.mf:
201-
mute_check.add_functest(args.mf)
196+
if args.m:
197+
mute_check.load(args.m)
202198

203199
transform(
204200
args.in_file,

0 commit comments

Comments
 (0)