Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion tests/e2e_tests/e2e_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
--compiled_pipeline_path: The KFP pipeline definition to use.
--test_spec_uri: URI to a YAML file containing test specifications.
The following arguments are optional:
--test_prefix: [Optional] Prefix to prepend to all job names.
Example: --test_prefix=my_e2e_ produces job names like my_e2e_cora_nalp_test_on_...
--test_names: [Optional] Test name to run from the test spec file. The value can be repeated for running multiple tests.
If not provided, all tests in the spec files will be run.
Example: --test_names=cora_glt_udl_test_on --test_names=cora_nalp_test_on
Expand Down Expand Up @@ -105,11 +107,12 @@ class E2ETestsSpec:
def run_all_e2e_tests(
tests: dict[str, E2ETest],
compiled_pipeline_path: Uri,
test_prefix: str = "",
) -> None:
orchestrator = KfpOrchestrator()
runs_to_wait_on: list[PipelineJob] = []
for job_name, job in tests.items():
full_job_name = f"{job_name}{job.name_suffix}"
full_job_name = f"{test_prefix}{job_name}{job.name_suffix}"
logger.info(f"Compiling and running job: {full_job_name}")
logger.info(
textwrap.dedent(
Expand Down Expand Up @@ -162,6 +165,12 @@ def run_all_e2e_tests(
required=True,
help="The compiled pipeline definition to use.",
)
parser.add_argument(
"--test_prefix",
type=str,
default="",
help="Prefix to prepend to all job names. Example: --test_prefix=my_e2e_ produces job names like my_e2e_cora_nalp_test_on_...",
)
parser.add_argument(
"--test_names",
type=str,
Expand Down Expand Up @@ -192,4 +201,5 @@ def run_all_e2e_tests(
run_all_e2e_tests(
tests=filtered_tests,
compiled_pipeline_path=compiled_pipeline_path,
test_prefix=args.test_prefix,
)