File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3333# Default location for ROCm Validation Suite binary.
3434RVS_BIN = Path ("/opt/rocm/bin/rvs" )
3535
36+ # ROCm Validation Suite snap common directory for sharing configuration files.
37+ RVS_SNAP_COMMON = Path ("/var/snap/rocm-validation-suite/common" )
38+
3639# Location of the RVS module configurations.
3740PLAINBOX_PROVIDER_DATA = Path (os .getenv ("PLAINBOX_PROVIDER_DATA" , "." ))
3841
@@ -42,16 +45,14 @@ class ModuleRunner:
4245
4346 def __init__ (self , rvs : Path , config : Path ) -> None :
4447 """Initializes the module runner."""
48+ self .rvs = rvs
4549 self .config = config
4650
4751 # CHECKBOX-2021: Snap confinement prevents access to /usr/share
4852 snap_bins = ["/snap/bin/rvs" , "/snap/bin/rocm-validation-suite" ]
4953 if any (rvs .match (p ) for p in snap_bins ):
50- # To avoid confinement issues we run the binary directly
51- snap_current = Path ("/snap/rocm-validation-suite/current" )
52- self .rvs = list (snap_current .glob ("opt/rocm-*/bin/rvs" ))[0 ]
53- else :
54- self .rvs = rvs
54+ shutil .copy (config , RVS_SNAP_COMMON )
55+ self .config = RVS_SNAP_COMMON / config .name
5556
5657 def run (self , module : str ):
5758 """Runs and validates the RVS module.
You can’t perform that action at this time.
0 commit comments