pybuilder-integration 112__tar.gz → 113__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pybuilder_integration-112 → pybuilder_integration-113}/PKG-INFO +1 -1
- {pybuilder_integration-112 → pybuilder_integration-113}/pybuilder_integration/tasks.py +12 -3
- {pybuilder_integration-112 → pybuilder_integration-113}/pybuilder_integration.egg-info/PKG-INFO +1 -1
- {pybuilder_integration-112 → pybuilder_integration-113}/setup.py +1 -1
- {pybuilder_integration-112 → pybuilder_integration-113}/pybuilder_integration/__init__.py +0 -0
- {pybuilder_integration-112 → pybuilder_integration-113}/pybuilder_integration/artifact_manager.py +0 -0
- {pybuilder_integration-112 → pybuilder_integration-113}/pybuilder_integration/cloudwatchlogs_utility.py +0 -0
- {pybuilder_integration-112 → pybuilder_integration-113}/pybuilder_integration/directory_utility.py +0 -0
- {pybuilder_integration-112 → pybuilder_integration-113}/pybuilder_integration/exec_utility.py +0 -0
- {pybuilder_integration-112 → pybuilder_integration-113}/pybuilder_integration/properties.py +0 -0
- {pybuilder_integration-112 → pybuilder_integration-113}/pybuilder_integration/tool_utility.py +0 -0
- {pybuilder_integration-112 → pybuilder_integration-113}/pybuilder_integration.egg-info/SOURCES.txt +0 -0
- {pybuilder_integration-112 → pybuilder_integration-113}/pybuilder_integration.egg-info/dependency_links.txt +0 -0
- {pybuilder_integration-112 → pybuilder_integration-113}/pybuilder_integration.egg-info/namespace_packages.txt +0 -0
- {pybuilder_integration-112 → pybuilder_integration-113}/pybuilder_integration.egg-info/requires.txt +0 -0
- {pybuilder_integration-112 → pybuilder_integration-113}/pybuilder_integration.egg-info/top_level.txt +0 -0
- {pybuilder_integration-112 → pybuilder_integration-113}/pybuilder_integration.egg-info/zip-safe +0 -0
- {pybuilder_integration-112 → pybuilder_integration-113}/setup.cfg +0 -0
|
@@ -63,6 +63,7 @@ _TAVERN_INSTALL_LOCK = threading.Lock()
|
|
|
63
63
|
_CYPRESS_TARGET_COPY_LOCK = threading.Lock()
|
|
64
64
|
_DEFAULT_PARALLEL_TAVERN_SUITE_WORKERS = 8
|
|
65
65
|
_DEFAULT_PARALLEL_CYPRESS_SUITE_WORKERS = 4
|
|
66
|
+
_CYPRESS_XVFB_DISPLAY_START = 100
|
|
66
67
|
_CYPRESS_SPEC_SUFFIXES = (
|
|
67
68
|
".js", ".jsx", ".ts", ".tsx", ".mjs", ".cjs", ".coffee", ".feature",
|
|
68
69
|
)
|
|
@@ -1190,6 +1191,10 @@ def _run_cypress_suites_parallel(suite_dirs, logger, project, reactor):
|
|
|
1190
1191
|
logger.info(
|
|
1191
1192
|
f"Running {len(work_items)} cypress shards in parallel (workers={workers})"
|
|
1192
1193
|
)
|
|
1194
|
+
xvfb_display_numbers = {
|
|
1195
|
+
name: _CYPRESS_XVFB_DISPLAY_START + index
|
|
1196
|
+
for index, (_suite_dir, name, _spec_files) in enumerate(work_items)
|
|
1197
|
+
}
|
|
1193
1198
|
|
|
1194
1199
|
def run_item(work_item):
|
|
1195
1200
|
suite_dir, name, spec_files = work_item
|
|
@@ -1205,6 +1210,7 @@ def _run_cypress_suites_parallel(suite_dirs, logger, project, reactor):
|
|
|
1205
1210
|
spec_files=spec_files,
|
|
1206
1211
|
skip_install=True,
|
|
1207
1212
|
record=False,
|
|
1213
|
+
xvfb_display_num=xvfb_display_numbers[name],
|
|
1208
1214
|
)
|
|
1209
1215
|
return "ran"
|
|
1210
1216
|
except BuildFailedException:
|
|
@@ -1284,7 +1290,8 @@ def _cypress_shard_had_no_matching_specs(project, shard_name):
|
|
|
1284
1290
|
output = log_file.read()
|
|
1285
1291
|
except OSError:
|
|
1286
1292
|
continue
|
|
1287
|
-
|
|
1293
|
+
plain_output = _ANSI_ESCAPE.sub("", output)
|
|
1294
|
+
if re.search(r"no spec files were found|Specs:\s*0 found", plain_output, re.IGNORECASE):
|
|
1288
1295
|
return True
|
|
1289
1296
|
return False
|
|
1290
1297
|
|
|
@@ -1349,7 +1356,7 @@ def _install_cypress_suite_dependencies(work_dir, logger, project, reactor, suit
|
|
|
1349
1356
|
|
|
1350
1357
|
|
|
1351
1358
|
def _run_cypress_tests_in_directory(work_dir, logger, project, reactor: Reactor, suite_name=None, write_summary=True,
|
|
1352
|
-
spec_files=None, skip_install=False, record=None):
|
|
1359
|
+
spec_files=None, skip_install=False, record=None, xvfb_display_num=None):
|
|
1353
1360
|
total_time = Timer.start()
|
|
1354
1361
|
target_url = project.get_mandatory_property(INTEGRATION_TARGET_URL)
|
|
1355
1362
|
environment = project.get_mandatory_property(ENVIRONMENT)
|
|
@@ -1385,7 +1392,9 @@ def _run_cypress_tests_in_directory(work_dir, logger, project, reactor: Reactor,
|
|
|
1385
1392
|
if spec_files:
|
|
1386
1393
|
args.extend(["--spec", ",".join(spec_files)])
|
|
1387
1394
|
_add_config_file(logger, project, args, environment, work_dir)
|
|
1388
|
-
environment_variables = project.get_property(ENVIRONMENT_VARIABLES, {})
|
|
1395
|
+
environment_variables = dict(project.get_property(ENVIRONMENT_VARIABLES, {}) or {})
|
|
1396
|
+
if xvfb_display_num is not None:
|
|
1397
|
+
environment_variables["XVFB_DISPLAY_NUM"] = str(xvfb_display_num)
|
|
1389
1398
|
logger.info(f"Running cypress on host: {target_url}")
|
|
1390
1399
|
log_file_name = f"cypress_run_{suite_name}.log" if suite_name else "cypress_run.log"
|
|
1391
1400
|
try:
|
|
@@ -21,7 +21,7 @@ class install(_install):
|
|
|
21
21
|
if __name__ == '__main__':
|
|
22
22
|
setup(
|
|
23
23
|
name = 'pybuilder-integration',
|
|
24
|
-
version = '
|
|
24
|
+
version = '113',
|
|
25
25
|
description = 'A pybuilder plugin that runs integration tests (Tavern & Cypress) against a target.',
|
|
26
26
|
long_description = 'A pybuilder plugin that runs integration tests against a target. This is intended to be a broader scope than unit-tests encompassing dependant functionality.',
|
|
27
27
|
long_description_content_type = None,
|
|
File without changes
|
{pybuilder_integration-112 → pybuilder_integration-113}/pybuilder_integration/artifact_manager.py
RENAMED
|
File without changes
|
|
File without changes
|
{pybuilder_integration-112 → pybuilder_integration-113}/pybuilder_integration/directory_utility.py
RENAMED
|
File without changes
|
{pybuilder_integration-112 → pybuilder_integration-113}/pybuilder_integration/exec_utility.py
RENAMED
|
File without changes
|
|
File without changes
|
{pybuilder_integration-112 → pybuilder_integration-113}/pybuilder_integration/tool_utility.py
RENAMED
|
File without changes
|
{pybuilder_integration-112 → pybuilder_integration-113}/pybuilder_integration.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pybuilder_integration-112 → pybuilder_integration-113}/pybuilder_integration.egg-info/requires.txt
RENAMED
|
File without changes
|
{pybuilder_integration-112 → pybuilder_integration-113}/pybuilder_integration.egg-info/top_level.txt
RENAMED
|
File without changes
|
{pybuilder_integration-112 → pybuilder_integration-113}/pybuilder_integration.egg-info/zip-safe
RENAMED
|
File without changes
|
|
File without changes
|