Skip to content

Commit

Permalink
Merge Pull Request #2352 from jpkenny/sst-elements/hg-fixtests
Browse files Browse the repository at this point in the history
Automatically Merged using SST Pull Request AutoTester
PR Title: b'minor fixes to merlin,mercury,mask-mpi'
PR Author: jpkenny
  • Loading branch information
sst-autotester committed May 10, 2024
2 parents 964ee7e + 6a5e7a1 commit 4ca45f3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 37 deletions.
22 changes: 7 additions & 15 deletions src/sst/elements/mask-mpi/tests/testsuite_default_mask_mpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,14 @@ def tearDown(self):

#####

def test_testme(self):
lib_dir = subprocess.run(["sst-config", "SST_ELEMENT_LIBRARY", "SST_ELEMENT_LIBRARY_LIBDIR"],
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
lib_dir = lib_dir.stdout.rstrip().decode()
tests_dir = subprocess.run(["sst-config", "SST_ELEMENT_TESTS", "mercury"],
stdout=subprocess.PIPE, stderr=subprocess.PIPE)

tests_dir = tests_dir.stdout.rstrip().decode()
sst_lib_path = lib_dir + ":" + tests_dir

paths = os.environ.get("SST_LIB_PATH")
if paths is None:
os.environ["SST_LIB_PATH"] = sst_lib_path
def test_sendrecv(self):
testdir = self.get_testsuite_dir()
libdir = sstsimulator_conf_get_value_str("SST_ELEMENT_LIBRARY","SST_ELEMENT_LIBRARY_LIBDIR")
path = os.environ.get("SST_LIB_PATH")
if path is None or path == "":
os.environ["SST_LIB_PATH"] = libdir
else:
os.environ["SST_LIB_PATH"] = paths + ":" + sst_lib_path

os.environ["SST_LIB_PATH"] = path + ":" + libdir
self.mask_mpi_template("test_sendrecv")

#####
Expand Down
27 changes: 6 additions & 21 deletions src/sst/elements/mercury/tests/testsuite_default_hg.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,6 @@

class testcase_hg(SSTTestCase):

# @classmethod
# def setUpClass(cls):
# hg_dir = subprocess.run(["sst-config", "SST_ELEMENT_TESTS", "mercury"],
# stdout=subprocess.PIPE, stderr=subprocess.PIPE)
# build_sh = hg_dir.stdout.rstrip().decode() + "/build.sh"
# subprocess.run(build_sh)

def setUp(self):
super(testcase_hg, self).setUp()
# Put test based setup code here. it is called once before every test
Expand All @@ -27,21 +20,13 @@ def tearDown(self):
#####

def test_testme(self):
lib_dir = subprocess.run(["sst-config", "SST_ELEMENT_LIBRARY", "SST_ELEMENT_LIBRARY_LIBDIR"],
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
lib_dir = lib_dir.stdout.rstrip().decode()
tests_dir = subprocess.run(["sst-config", "SST_ELEMENT_TESTS", "mercury"],
stdout=subprocess.PIPE, stderr=subprocess.PIPE)

tests_dir = tests_dir.stdout.rstrip().decode()
sst_lib_path = lib_dir + ":" + tests_dir

paths = os.environ.get("SST_LIB_PATH")
if paths is None:
os.environ["SST_LIB_PATH"] = sst_lib_path
testdir = self.get_testsuite_dir()
libdir = sstsimulator_conf_get_value_str("SST_ELEMENT_LIBRARY","SST_ELEMENT_LIBRARY_LIBDIR")
path = os.environ.get("SST_LIB_PATH")
if path is None or path == "":
os.environ["SST_LIB_PATH"] = libdir
else:
os.environ["SST_LIB_PATH"] = paths + ":" + sst_lib_path

os.environ["SST_LIB_PATH"] = path + ":" + libdir
self.simple_components_template("ostest")

#####
Expand Down
2 changes: 1 addition & 1 deletion src/sst/elements/merlin/pymerlin-base.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def _addVariable(self,var,dictionary=None,prefix=None):
def _addFormattedVariable(self,var,dictionary=None,prefix=None,callback=None):
if "%d" in var:
# Switch out the %d with \d+ (the regex version)
var = var.replace("%d","\d+")
var = var.replace("%d",r"\d+")

if not var in self._format_vars:
self._format_vars[var] = _member_formatted_info()
Expand Down

0 comments on commit 4ca45f3

Please sign in to comment.