Skip to content

Commit c0c213d

Browse files
authored
Split java/ruby unit test steps on Windows (elastic#15888)
As a follow up to elastic#15861 this commit splits the current unit tests step for the Windows JDK matrix pipeline to two that run Java and Ruby unit tests separately. Closes elastic#15566
1 parent b640e7e commit c0c213d

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

.buildkite/scripts/jdk-matrix-tests/generate-steps.py

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,13 +135,30 @@ def __init__(self, os: str, jdk: str, group_key: str, agent: typing.Union[GCPAge
135135
def all_jobs(self) -> list[typing.Callable[[], JobRetValues]]:
136136
return [
137137
self.init_annotation,
138-
self.unit_tests,
138+
self.java_unit_test,
139+
self.ruby_unit_test,
139140
]
140141

141-
def unit_tests(self) -> JobRetValues:
142-
step_name_human = "Unit Test (Java/Ruby)"
143-
step_key = f"{self.group_key}-unit-test"
144-
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
142+
def java_unit_test(self) -> JobRetValues:
143+
step_name_human = "Java Unit Test"
144+
step_key = f"{self.group_key}-java-unit-test"
145+
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
146+
'''
147+
148+
return JobRetValues(
149+
step_label=step_name_human,
150+
command=LiteralScalarString(test_command),
151+
step_key=step_key,
152+
depends=self.init_annotation_key,
153+
artifact_paths=["build_reports.zip"],
154+
agent=self.agent.to_dict(),
155+
retry=copy.deepcopy(ENABLED_RETRIES),
156+
)
157+
158+
def ruby_unit_test(self) -> JobRetValues:
159+
step_name_human = "Ruby Unit Test"
160+
step_key = f"{self.group_key}-ruby-unit-test"
161+
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
145162
'''
146163

147164
return JobRetValues(

0 commit comments

Comments
 (0)