Skip to content

Commit f0c8789

Browse files
author
Andrija Kolic
committed
[GR-66913] [GR-59986] Read 'gos-scenario --version'
PullRequest: graal/21349
2 parents c411260 + a759f47 commit f0c8789

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

substratevm/mx.substratevm/mx_substratevm_benchmark.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ def extra_run_arg(self, benchmark, args, image_run_args):
379379

380380
def build_assertions(self, benchmark: str, is_gate: bool) -> List[str]:
381381
# We cannot enable assertions along with emitting a build report for layered images, due to GR-65751
382-
if self.stages_info.current_stage.is_layered:
382+
if self.stages_info.current_stage.is_layered():
383383
return []
384384
return super().build_assertions(benchmark, is_gate)
385385

@@ -630,12 +630,13 @@ def _load_gos_scenario_home(self) -> Path:
630630

631631
def _read_gos_scenario_version(self):
632632
"""
633-
Dynamically gets the version of the graalos-load-tester based on git tags,
634-
or reverts to default 'unknown' otherwise.
633+
Dynamically gets the version of the graalos-load-tester based on the pyproject.toml file,
634+
falls back to 'unknown' if unsuccessful.
635635
"""
636-
# Revisit this method once we rework versioning for graalos-load-tester (GR-59986)
637636
try:
638-
return mx.GitConfig().git_command(self.gos_scenario_home, ["describe", "--tags", "--abbrev=0"]).strip()
637+
out = mx.OutputCapture()
638+
mx.run([self._gos_scenario_command(), "--version"], out=out, env=self.get_stage_env())
639+
return out.data.strip()
639640
except:
640641
return self.defaultSuiteVersion()
641642

@@ -851,7 +852,10 @@ def extra_run_arg(self, benchmark, args, image_run_args):
851852

852853
def build_assertions(self, benchmark: str, is_gate: bool) -> List[str]:
853854
# We cannot enable assertions along with emitting a build report for layered images, due to GR-65751
854-
if self.stages_info.current_stage.is_layered:
855+
if self.stages_info.current_stage.is_layered():
856+
return []
857+
# We cannot enable assertions for Micronaut Pegasus Function due to an AssertionError (see GR-67326)
858+
if self._get_benchmark_config(benchmark)["app"] == "micronaut-pegasus-function":
855859
return []
856860
return super().build_assertions(benchmark, is_gate)
857861

0 commit comments

Comments
 (0)