Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport PR #15888 to 8.12: Split java/ruby unit test steps on Windows #15993

Merged
merged 1 commit into from
Mar 11, 2024
Merged
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
27 changes: 22 additions & 5 deletions .buildkite/scripts/jdk-matrix-tests/generate-steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,30 @@ def __init__(self, os: str, jdk: str, group_key: str, agent: typing.Union[GCPAge
def all_jobs(self) -> list[typing.Callable[[], JobRetValues]]:
return [
self.init_annotation,
self.unit_tests,
self.java_unit_test,
self.ruby_unit_test,
]

def unit_tests(self) -> JobRetValues:
step_name_human = "Unit Test (Java/Ruby)"
step_key = f"{self.group_key}-unit-test"
test_command = rf'''.\\.buildkite\\scripts\\jdk-matrix-tests\\launch-command.ps1 -JDK "{self.jdk}" -StepNameHuman "{step_name_human}" -AnnotateContext "{self.group_key}" -CIScript ".\\ci\\unit_tests.ps1" -Annotate
def java_unit_test(self) -> JobRetValues:
step_name_human = "Java Unit Test"
step_key = f"{self.group_key}-java-unit-test"
test_command = rf'''.\\.buildkite\\scripts\\jdk-matrix-tests\\launch-command.ps1 -JDK "{self.jdk}" -StepNameHuman "{step_name_human}" -AnnotateContext "{self.group_key}" -CIScript ".\\ci\\unit_tests.ps1 java" -Annotate
'''

return JobRetValues(
step_label=step_name_human,
command=LiteralScalarString(test_command),
step_key=step_key,
depends=self.init_annotation_key,
artifact_paths=["build_reports.zip"],
agent=self.agent.to_dict(),
retry=copy.deepcopy(ENABLED_RETRIES),
)

def ruby_unit_test(self) -> JobRetValues:
step_name_human = "Ruby Unit Test"
step_key = f"{self.group_key}-ruby-unit-test"
test_command = rf'''.\\.buildkite\\scripts\\jdk-matrix-tests\\launch-command.ps1 -JDK "{self.jdk}" -StepNameHuman "{step_name_human}" -AnnotateContext "{self.group_key}" -CIScript ".\\ci\\unit_tests.ps1 ruby" -Annotate
'''

return JobRetValues(
Expand Down