potiuk commented on code in PR #35160:
URL: https://github.com/apache/airflow/pull/35160#discussion_r1375455786


##########
dev/breeze/src/airflow_breeze/utils/run_tests.py:
##########
@@ -87,3 +89,262 @@ def run_docker_compose_tests(
 def file_name_from_test_type(test_type: str):
     test_type_no_brackets = test_type.lower().replace("[", "_").replace("]", 
"")
     return re.sub("[,.]", "_", test_type_no_brackets)[:30]
+
+
+def test_paths(test_type: str, backend: str, helm_test_package: str | None) -> 
tuple[str, str, str]:
+    file_friendly_test_type = file_name_from_test_type(test_type)
+    extra_package = f"-{helm_test_package}" if helm_test_package else ""
+    random_suffix = os.urandom(4).hex()
+    result_log_file = 
f"/files/test_result-{file_friendly_test_type}{extra_package}-{backend}.xml"
+    warnings_file = 
f"/files/warning-{file_friendly_test_type}{extra_package}-{backend}.txt"
+    coverage_file = 
f"/files/coverage-{file_friendly_test_type}-{backend}-{random_suffix}.xml"
+    return result_log_file, warnings_file, coverage_file
+
+
+def get_suspended_provider_args() -> list[str]:
+    pytest_args = []
+    suspended_folders = get_suspended_providers_folders()
+    for providers in suspended_folders:
+        pytest_args.extend(
+            [
+                "--ignore",
+                f"tests/providers/{providers}",
+                "--ignore",
+                f"tests/system/providers/{providers}",
+                "--ignore",
+                f"tests/integration/providers/{providers}",
+            ]
+        )
+    return pytest_args
+
+
+TEST_TYPE_MAP_TO_PYTEST_ARGS: dict[str, list[str]] = {
+    "Always": ["tests/always"],
+    "API": ["tests/api", "tests/api_experimental", "tests/api_connexion", 
"tests/api_internal"],
+    "CLI": ["tests/cli"],
+    "Core": [
+        "tests/core",
+        "tests/executors",
+        "tests/jobs",
+        "tests/models",
+        "tests/ti_deps",
+        "tests/utils",
+    ],
+    "Serialization": [
+        "tests/serialization",
+    ],
+    "Integration": ["tests/integration"],
+    "PythonVenv": [
+        "tests/operators/test_python.py::TestPythonVirtualenvOperator",
+    ],
+    "BranchPythonVenv": [

Review Comment:
   We include those new test types - by separating "virtualenv" and "external" 
operators to 4 separate test types and exclude them from "Operators" test type, 
by `--exclude` flags. This way we can parallelise the test types better - none 
of the test types last more than 7 minutes now and they seem to nicely work in 
paralell on self-hosted machines.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to