Skip to content

Commit a759f47

Browse files
author
Andrija Kolic
committed
Read 'gos-scenario --version' in the graalos bench suite.
1 parent 9ec2ad2 commit a759f47

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
@@ -378,7 +378,7 @@ def extra_run_arg(self, benchmark, args, image_run_args):
378378

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

@@ -629,12 +629,13 @@ def _load_gos_scenario_home(self) -> Path:
629629

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

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

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

0 commit comments

Comments
 (0)