aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvturov <vturov@yandex-team.com>2024-09-17 10:55:28 +0300
committervturov <vturov@yandex-team.com>2024-09-17 11:07:18 +0300
commit7f4c79dc8e6133a0f26e69c9085b4f897b5cbefa (patch)
tree5868c36095a80837daa757449cde4a19a89961f6
parent43ceb108fd23a21d6a9bb0e7533a9f31e3af06c0 (diff)
downloadydb-7f4c79dc8e6133a0f26e69c9085b4f897b5cbefa.tar.gz
add playwright-large test runner
Добавляем тест-раннер для playwright-large commit_hash:6e409a792b3ea208d086602118f0f70ec6646726
-rw-r--r--build/conf/ts/ts_test.conf32
-rw-r--r--build/plugins/nots.py15
2 files changed, 45 insertions, 2 deletions
diff --git a/build/conf/ts/ts_test.conf b/build/conf/ts/ts_test.conf
index 19bcfcc6cc..5051106b69 100644
--- a/build/conf/ts/ts_test.conf
+++ b/build/conf/ts/ts_test.conf
@@ -113,6 +113,38 @@ module TS_TEST_PLAYWRIGHT_FOR: _TS_TEST_BASE {
_TS_TEST_FOR_CONFIGURE(playwright playwright.config.ts workspace_node_modules.tar)
}
+TS_TEST_PLAYWRIGHT_LARGE_CMD=$TOUCH_UNIT \
+ && ${cwd:BINDIR} $MOVE_FILE ${input:TS_TEST_NM} ${output:"workspace_node_modules.tar"} \
+ ${kv;hide:"p TSPW"} ${kv;hide:"pc magenta"}
+
+### @usage: TS_TEST_PLAYWRIGHT_LARGE_FOR(Path)
+###
+### Defines testing module with playwright test runner.
+###
+### Documentation: https://docs.yandex-team.ru/frontend-in-arcadia/references/TS_TEST_PLAYWRIGHT_FOR
+###
+### @example
+###
+### TS_TEST_PLAYWRIGHT_LARGE_FOR(path/to/module)
+### TS_TEST_SRCS(../src)
+### TS_TEST_CONFIG(../playwright.config.js)
+### END()
+###
+module TS_TEST_PLAYWRIGHT_LARGE_FOR: _TS_TEST_BASE {
+ .CMD=TS_TEST_PLAYWRIGHT_LARGE_CMD
+
+ # for multimodule peers we should choose TS
+ SET(PEERDIR_TAGS TS)
+
+ # compatibility with old TS_TEST_SRCS
+ SET(TS_TEST_EXTENSION (playwright|spec).(ts|js))
+
+ TS_TEST_DEPENDS_ON_BUILD()
+ _DEPENDS_ON_MOD()
+ _PEERDIR_TS_RESOURCE(nodejs playwright)
+ _TS_TEST_FOR_CONFIGURE(playwright_large playwright.config.ts workspace_node_modules.tar)
+}
+
### # internal
module _TS_TEST_BASE: _BARE_UNIT {
# ignore SRCS macro
diff --git a/build/plugins/nots.py b/build/plugins/nots.py
index 8e3735671e..625b1af5bf 100644
--- a/build/plugins/nots.py
+++ b/build/plugins/nots.py
@@ -43,6 +43,7 @@ class TsTestType(StrEnum):
HERMIONE = auto()
JEST = auto()
PLAYWRIGHT = auto()
+ PLAYWRIGHT_LARGE = auto()
TSC_TYPECHECK = auto()
TS_STYLELINT = auto()
@@ -100,6 +101,16 @@ TS_TEST_SPECIFIC_FIELDS = {
df.TsResources.value,
df.TsTestForPath.value,
),
+ TsTestType.PLAYWRIGHT_LARGE: (
+ df.ConfigPath.value,
+ df.Size.from_unit,
+ df.Tag.from_unit_fat_external_no_retries,
+ df.Requirements.from_unit_with_full_network,
+ df.TsResources.value,
+ df.TsTestDataDirs.value,
+ df.TsTestDataDirsRename.value,
+ df.TsTestForPath.value,
+ ),
TsTestType.TSC_TYPECHECK: (
df.Size.from_unit,
df.TestCwd.moddir,
@@ -797,7 +808,7 @@ def on_ts_test_for_configure(unit, test_runner, default_config, node_modules_fil
unit.on_setup_extract_node_modules_recipe([for_mod_path])
unit.on_setup_extract_output_tars_recipe([for_mod_path])
- build_root = "$B" if test_runner == TsTestType.HERMIONE else "$(BUILD_ROOT)"
+ build_root = "$B" if test_runner in [TsTestType.HERMIONE, TsTestType.PLAYWRIGHT_LARGE] else "$(BUILD_ROOT)"
unit.set(["TS_TEST_NM", os.path.join(build_root, for_mod_path, node_modules_filename)])
config_path = unit.get("TS_TEST_CONFIG_PATH")
@@ -834,7 +845,7 @@ def on_ts_test_for_configure(unit, test_runner, default_config, node_modules_fil
extra_deps = df.CustomDependencies.test_depends_only(unit, (), {})[df.CustomDependencies.KEY].split()
dart_record[df.CustomDependencies.KEY] = " ".join(sort_uniq(deps + extra_deps))
- if test_runner == TsTestType.HERMIONE:
+ if test_runner in [TsTestType.HERMIONE, TsTestType.PLAYWRIGHT_LARGE]:
dart_record[df.Size.KEY] = "LARGE"
data = ytest.dump_test(unit, dart_record)