Skip to content

Commit

Permalink
Expand envvars in benchmark path
Browse files Browse the repository at this point in the history
  • Loading branch information
caizixian committed Nov 20, 2023
1 parent d6d5cda commit 2a2154b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/running/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from running.modifier import JVMArg, Modifier
import logging
from running.util import register, split_quoted
import os.path

__DRY_RUN = False
__DEFAULT_MINHEAP = 4096
Expand Down Expand Up @@ -109,7 +110,7 @@ def __init__(self, **kwargs):
raise ValueError(
"DaCapo release {} not recongized".format(self.release))
self.path: Path
self.path = Path(kwargs["path"])
self.path = Path(os.path.expandvars(kwargs["path"]))
if not self.path.exists():
logging.warning("DaCapo jar {} not found".format(self.path))
self.minheap: Optional[str]
Expand Down Expand Up @@ -282,7 +283,7 @@ def __init__(self, **kwargs):
raise ValueError(
"SPECjbb2015 release {} not recongized".format(self.release))
self.path: Path
self.path = Path(kwargs["path"]).resolve()
self.path = Path(os.path.expandvars(kwargs["path"])).resolve()
self.propsfile = (self.path / ".." / "config" /
"specjbb2015.props").resolve()
if not self.path.exists():
Expand Down Expand Up @@ -323,7 +324,7 @@ class Octane(BenchmarkSuite):
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.path: Path
self.path = Path(kwargs["path"]).resolve()
self.path = Path(os.path.expandvars(kwargs["path"])).resolve()
if not self.path.exists():
logging.info("Octane folder {} not found".format(self.path))
self.wrapper: Path
Expand Down Expand Up @@ -403,7 +404,7 @@ def __init__(self, **kwargs):
raise ValueError(
"SPECjvm98 release {} not recongized".format(self.release))
self.path: Path
self.path = Path(kwargs["path"]).resolve()
self.path = Path(os.path.expandvars(kwargs["path"])).resolve()

if not self.path.exists():
logging.info("SPECjvm98 {} not found".format(self.path))
Expand Down Expand Up @@ -452,7 +453,7 @@ class JuliaGCBenchmarks(BenchmarkSuite):
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.path: Path
self.path = Path(kwargs["path"])
self.path = Path(os.path.expandvars(kwargs["path"]))
if not self.path.exists():
logging.warning(
"JuliaGCBenchmarks does not exist at {}".format(self.path))
Expand Down

0 comments on commit 2a2154b

Please sign in to comment.