From a2b420c6ab580ae09704876c8a6b63a0fab8b1dd Mon Sep 17 00:00:00 2001 From: "Justin M. LaPre" Date: Tue, 6 Aug 2024 16:10:51 +0000 Subject: [PATCH 1/3] remove initializeTestModule_SingleInstance() where it's empty, leave the others for later --- .../tests/testsuite_default_cacheTracer.py | 14 ----------- .../testsuite_default_cassini_prefetch.py | 22 ----------------- .../gensa/tests/testsuite_default_gensa.py | 22 ----------------- .../tests/testsuite_default_kingsley.py | 22 ----------------- .../llyr/tests/testsuite_default_llyr.py | 22 ----------------- ...estsuite_default_memHierarchy_hybridsim.py | 24 ------------------- .../testsuite_default_memHierarchy_memHA.py | 21 ---------------- .../testsuite_default_memHierarchy_sdl.py | 24 ------------------- ...ite_openMP_memHierarchy_dirnoncacheable.py | 22 ----------------- ...testsuite_openMP_memHierarchy_diropenMP.py | 22 ----------------- .../testsuite_sweep_memHierarchy_dirSweepB.py | 21 ---------------- .../merlin/tests/testsuite_default_merlin.py | 22 ----------------- .../tests/testsuite_default_Messier.py | 22 ----------------- .../tests/testsuite_default_miranda.py | 22 ----------------- .../samba/tests/testsuite_default_Samba.py | 22 ----------------- .../shogun/tests/testsuite_default_shogun.py | 22 ----------------- .../tests/testsuite_default_VaultSim.py | 22 ----------------- 17 files changed, 368 deletions(-) diff --git a/src/sst/elements/cacheTracer/tests/testsuite_default_cacheTracer.py b/src/sst/elements/cacheTracer/tests/testsuite_default_cacheTracer.py index 72f19bf768..0719ac74b3 100644 --- a/src/sst/elements/cacheTracer/tests/testsuite_default_cacheTracer.py +++ b/src/sst/elements/cacheTracer/tests/testsuite_default_cacheTracer.py @@ -9,19 +9,6 @@ module_init = 0 module_sema = threading.Semaphore() -def initializeTestModule_SingleInstance(class_inst): - global module_init - global module_sema - - module_sema.acquire() - if module_init != 1: - try: - # Put your single instance Init Code Here - pass - except: - pass - module_init = 1 - module_sema.release() ################################################################################ @@ -34,7 +21,6 @@ def initializeClass(self, testName): def setUp(self): super(type(self), self).setUp() - initializeTestModule_SingleInstance(self) # Put test based setup code here. it is called once before every test def tearDown(self): diff --git a/src/sst/elements/cassini/tests/testsuite_default_cassini_prefetch.py b/src/sst/elements/cassini/tests/testsuite_default_cassini_prefetch.py index 5ec90058bf..720fb8aab4 100644 --- a/src/sst/elements/cassini/tests/testsuite_default_cassini_prefetch.py +++ b/src/sst/elements/cassini/tests/testsuite_default_cassini_prefetch.py @@ -3,27 +3,6 @@ from sst_unittest import * from sst_unittest_support import * -################################################################################ -# Code to support a single instance module initialize, must be called setUp method - -module_init = 0 -module_sema = threading.Semaphore() - -def initializeTestModule_SingleInstance(class_inst): - global module_init - global module_sema - - module_sema.acquire() - if module_init != 1: - try: - # Put your single instance Init Code Here - pass - except: - pass - module_init = 1 - module_sema.release() - -################################################################################ class testcase_cassini_prefetch(SSTTestCase): @@ -34,7 +13,6 @@ def initializeClass(self, testName): def setUp(self): super(type(self), self).setUp() - initializeTestModule_SingleInstance(self) # Put test based setup code here. it is called once before every test def tearDown(self): diff --git a/src/sst/elements/gensa/tests/testsuite_default_gensa.py b/src/sst/elements/gensa/tests/testsuite_default_gensa.py index e52f94e7c1..11a003fd38 100644 --- a/src/sst/elements/gensa/tests/testsuite_default_gensa.py +++ b/src/sst/elements/gensa/tests/testsuite_default_gensa.py @@ -3,27 +3,6 @@ from sst_unittest import * from sst_unittest_support import * -################################################################################ -# Code to support a single instance module initialize, must be called setUp method - -module_init = 0 -module_sema = threading.Semaphore() - -def initializeTestModule_SingleInstance(class_inst): - global module_init - global module_sema - - module_sema.acquire() - if module_init != 1: - try: - # Put your single instance Init Code Here - pass - except: - pass - module_init = 1 - module_sema.release() - -################################################################################ class testcase_gensa_Component(SSTTestCase): @@ -34,7 +13,6 @@ def initializeClass(self, testName): def setUp(self): super(type(self), self).setUp() - initializeTestModule_SingleInstance(self) # Put test based setup code here. it is called once before every test def tearDown(self): diff --git a/src/sst/elements/kingsley/tests/testsuite_default_kingsley.py b/src/sst/elements/kingsley/tests/testsuite_default_kingsley.py index bee501b6d7..7465780a50 100644 --- a/src/sst/elements/kingsley/tests/testsuite_default_kingsley.py +++ b/src/sst/elements/kingsley/tests/testsuite_default_kingsley.py @@ -3,27 +3,6 @@ from sst_unittest import * from sst_unittest_support import * -################################################################################ -# Code to support a single instance module initialize, must be called setUp method - -module_init = 0 -module_sema = threading.Semaphore() - -def initializeTestModule_SingleInstance(class_inst): - global module_init - global module_sema - - module_sema.acquire() - if module_init != 1: - try: - # Put your single instance Init Code Here - pass - except: - pass - module_init = 1 - module_sema.release() - -################################################################################ class testcase_kingsley_Component(SSTTestCase): @@ -34,7 +13,6 @@ def initializeClass(self, testName): def setUp(self): super(type(self), self).setUp() - initializeTestModule_SingleInstance(self) # Put test based setup code here. it is called once before every test def tearDown(self): diff --git a/src/sst/elements/llyr/tests/testsuite_default_llyr.py b/src/sst/elements/llyr/tests/testsuite_default_llyr.py index a7523d1f1e..425e24ab76 100644 --- a/src/sst/elements/llyr/tests/testsuite_default_llyr.py +++ b/src/sst/elements/llyr/tests/testsuite_default_llyr.py @@ -3,27 +3,6 @@ from sst_unittest import * from sst_unittest_support import * -################################################################################ -# Code to support a single instance module initialize, must be called setUp method - -module_init = 0 -module_sema = threading.Semaphore() - -def initializeTestModule_SingleInstance(class_inst): - global module_init - global module_sema - - module_sema.acquire() - if module_init != 1: - try: - # Put your single instance Init Code Here - pass - except: - pass - module_init = 1 - module_sema.release() - -################################################################################ class testcase_llyr_Component(SSTTestCase): @@ -34,7 +13,6 @@ def initializeClass(self, testName): def setUp(self): super(type(self), self).setUp() - initializeTestModule_SingleInstance(self) # Put test based setup code here. it is called once before every test def tearDown(self): diff --git a/src/sst/elements/memHierarchy/tests/testsuite_default_memHierarchy_hybridsim.py b/src/sst/elements/memHierarchy/tests/testsuite_default_memHierarchy_hybridsim.py index 04b6ae51e9..fc8d5ed7c9 100644 --- a/src/sst/elements/memHierarchy/tests/testsuite_default_memHierarchy_hybridsim.py +++ b/src/sst/elements/memHierarchy/tests/testsuite_default_memHierarchy_hybridsim.py @@ -4,29 +4,6 @@ from sst_unittest_support import * import os -################################################################################ -# Code to support a single instance module initialize, must be called setUp method - -module_init = 0 -module_sema = threading.Semaphore() - -def initializeTestModule_SingleInstance(class_inst): - global module_init - global module_sema - - module_sema.acquire() - if module_init != 1: - try: - # Put your single instance Init Code Here - pass - except: - pass - module_init = 1 - module_sema.release() - -################################################################################ -################################################################################ -################################################################################ class testcase_memHierarchy_hybridsim(SSTTestCase): @@ -37,7 +14,6 @@ def initializeClass(self, testName): def setUp(self): super(type(self), self).setUp() - initializeTestModule_SingleInstance(self) # Put test based setup code here. it is called once before every test def tearDown(self): diff --git a/src/sst/elements/memHierarchy/tests/testsuite_default_memHierarchy_memHA.py b/src/sst/elements/memHierarchy/tests/testsuite_default_memHierarchy_memHA.py index 2da5ad3bba..85c653510c 100644 --- a/src/sst/elements/memHierarchy/tests/testsuite_default_memHierarchy_memHA.py +++ b/src/sst/elements/memHierarchy/tests/testsuite_default_memHierarchy_memHA.py @@ -5,27 +5,7 @@ import os.path import re -################################################################################ -# Code to support a single instance module initialize, must be called setUp method - -module_init = 0 -module_sema = threading.Semaphore() - -def initializeTestModule_SingleInstance(class_inst): - global module_init - global module_sema - module_sema.acquire() - if module_init != 1: - try: - # Put your single instance Init Code Here - pass - except: - pass - module_init = 1 - module_sema.release() - -################################################################################ ################################################################################ ################################################################################ @@ -38,7 +18,6 @@ def initializeClass(self, testName): def setUp(self): super(type(self), self).setUp() - initializeTestModule_SingleInstance(self) # Put test based setup code here. it is called once before every test def tearDown(self): diff --git a/src/sst/elements/memHierarchy/tests/testsuite_default_memHierarchy_sdl.py b/src/sst/elements/memHierarchy/tests/testsuite_default_memHierarchy_sdl.py index 0affad89dc..dc6901c6f6 100644 --- a/src/sst/elements/memHierarchy/tests/testsuite_default_memHierarchy_sdl.py +++ b/src/sst/elements/memHierarchy/tests/testsuite_default_memHierarchy_sdl.py @@ -4,29 +4,6 @@ from sst_unittest_support import * import os.path -################################################################################ -# Code to support a single instance module initialize, must be called setUp method - -module_init = 0 -module_sema = threading.Semaphore() - -def initializeTestModule_SingleInstance(class_inst): - global module_init - global module_sema - - module_sema.acquire() - if module_init != 1: - try: - # Put your single instance Init Code Here - pass - except: - pass - module_init = 1 - module_sema.release() - -################################################################################ -################################################################################ -################################################################################ class testcase_memHierarchy_sdl(SSTTestCase): @@ -37,7 +14,6 @@ def initializeClass(self, testName): def setUp(self): super(type(self), self).setUp() - initializeTestModule_SingleInstance(self) # Put test based setup code here. it is called once before every test def tearDown(self): diff --git a/src/sst/elements/memHierarchy/tests/testsuite_openMP_memHierarchy_dirnoncacheable.py b/src/sst/elements/memHierarchy/tests/testsuite_openMP_memHierarchy_dirnoncacheable.py index 163200cc6e..8688b34937 100644 --- a/src/sst/elements/memHierarchy/tests/testsuite_openMP_memHierarchy_dirnoncacheable.py +++ b/src/sst/elements/memHierarchy/tests/testsuite_openMP_memHierarchy_dirnoncacheable.py @@ -3,27 +3,6 @@ from sst_unittest import * from sst_unittest_support import * -module_init = 0 -module_sema = threading.Semaphore() - -################################################################################ -# Code to support a single instance module initialize, must be called setUp method - -def initializeTestModule_SingleInstance(class_inst): - global module_init - global module_sema - - module_sema.acquire() - if module_init != 1: - try: - # Put your single instance Init Code Here - pass - except: - pass - module_init = 1 - module_sema.release() - -################################################################################ class testcase_memH_openMP_dirnoncacheable(SSTTestCase): @@ -34,7 +13,6 @@ def initializeClass(self, testName): def setUp(self): super(type(self), self).setUp() - initializeTestModule_SingleInstance(self) def tearDown(self): # Put test based teardown code here. it is called once after every test diff --git a/src/sst/elements/memHierarchy/tests/testsuite_openMP_memHierarchy_diropenMP.py b/src/sst/elements/memHierarchy/tests/testsuite_openMP_memHierarchy_diropenMP.py index da6be5f0b4..d76ddddee1 100644 --- a/src/sst/elements/memHierarchy/tests/testsuite_openMP_memHierarchy_diropenMP.py +++ b/src/sst/elements/memHierarchy/tests/testsuite_openMP_memHierarchy_diropenMP.py @@ -3,27 +3,6 @@ from sst_unittest import * from sst_unittest_support import * -module_init = 0 -module_sema = threading.Semaphore() - -################################################################################ -# Code to support a single instance module initialize, must be called setUp method - -def initializeTestModule_SingleInstance(class_inst): - global module_init - global module_sema - - module_sema.acquire() - if module_init != 1: - try: - # Put your single instance Init Code Here - pass - except: - pass - module_init = 1 - module_sema.release() - -################################################################################ class testcase_memH_openMP_diropenMP(SSTTestCase): @@ -34,7 +13,6 @@ def initializeClass(self, testName): def setUp(self): super(type(self), self).setUp() - initializeTestModule_SingleInstance(self) def tearDown(self): # Put test based teardown code here. it is called once after every test diff --git a/src/sst/elements/memHierarchy/tests/testsuite_sweep_memHierarchy_dirSweepB.py b/src/sst/elements/memHierarchy/tests/testsuite_sweep_memHierarchy_dirSweepB.py index 71cc461171..80afaf2cad 100644 --- a/src/sst/elements/memHierarchy/tests/testsuite_sweep_memHierarchy_dirSweepB.py +++ b/src/sst/elements/memHierarchy/tests/testsuite_sweep_memHierarchy_dirSweepB.py @@ -10,8 +10,6 @@ dirpath = os.path.dirname(sys.modules[__name__].__file__) -module_init = 0 -module_sema = threading.Semaphore() sweep_test_matrix = [] ################################################################################ @@ -122,24 +120,6 @@ def gen_custom_name(testcase_func, param_num, param): parameterized.to_safe_name(str(param.args[9]))) # prefetch return testcasename -################################################################################ -# Code to support a single instance module initialize, must be called setUp method - -def initializeTestModule_SingleInstance(class_inst): - global module_init - global module_sema - - module_sema.acquire() - if module_init != 1: - try: - # Put your single instance Init Code Here - pass - except: - pass - module_init = 1 - module_sema.release() - -################################################################################ class testcase_memH_sweep_dirsweepB(SSTTestCase): @@ -150,7 +130,6 @@ def initializeClass(self, testName): def setUp(self): super(type(self), self).setUp() - initializeTestModule_SingleInstance(self) def tearDown(self): # Put test based teardown code here. it is called once after every test diff --git a/src/sst/elements/merlin/tests/testsuite_default_merlin.py b/src/sst/elements/merlin/tests/testsuite_default_merlin.py index 8624e27f22..dae783f02e 100644 --- a/src/sst/elements/merlin/tests/testsuite_default_merlin.py +++ b/src/sst/elements/merlin/tests/testsuite_default_merlin.py @@ -12,27 +12,6 @@ except: pass -################################################################################ -# Code to support a single instance module initialize, must be called setUp method - -module_init = 0 -module_sema = threading.Semaphore() - -def initializeTestModule_SingleInstance(class_inst): - global module_init - global module_sema - - module_sema.acquire() - if module_init != 1: - try: - # Put your single instance Init Code Here - pass - except: - pass - module_init = 1 - module_sema.release() - -################################################################################ class testcase_merlin_Component(SSTTestCase): @@ -43,7 +22,6 @@ def initializeClass(self, testName): def setUp(self): super(type(self), self).setUp() - initializeTestModule_SingleInstance(self) # Put test based setup code here. it is called once before every test def tearDown(self): diff --git a/src/sst/elements/messier/tests/testsuite_default_Messier.py b/src/sst/elements/messier/tests/testsuite_default_Messier.py index 30ec4c3b38..488fbcfa3c 100644 --- a/src/sst/elements/messier/tests/testsuite_default_Messier.py +++ b/src/sst/elements/messier/tests/testsuite_default_Messier.py @@ -3,27 +3,6 @@ from sst_unittest import * from sst_unittest_support import * -################################################################################ -# Code to support a single instance module initialize, must be called setUp method - -module_init = 0 -module_sema = threading.Semaphore() - -def initializeTestModule_SingleInstance(class_inst): - global module_init - global module_sema - - module_sema.acquire() - if module_init != 1: - try: - # Put your single instance Init Code Here - pass - except: - pass - module_init = 1 - module_sema.release() - -################################################################################ class testcase_Messier_Component(SSTTestCase): @@ -34,7 +13,6 @@ def initializeClass(self, testName): def setUp(self): super(type(self), self).setUp() - initializeTestModule_SingleInstance(self) # Put test based setup code here. it is called once before every test def tearDown(self): diff --git a/src/sst/elements/miranda/tests/testsuite_default_miranda.py b/src/sst/elements/miranda/tests/testsuite_default_miranda.py index 37fd583b38..03871fe308 100644 --- a/src/sst/elements/miranda/tests/testsuite_default_miranda.py +++ b/src/sst/elements/miranda/tests/testsuite_default_miranda.py @@ -3,27 +3,6 @@ from sst_unittest import * from sst_unittest_support import * -################################################################################ -# Code to support a single instance module initialize, must be called setUp method - -module_init = 0 -module_sema = threading.Semaphore() - -def initializeTestModule_SingleInstance(class_inst): - global module_init - global module_sema - - module_sema.acquire() - if module_init != 1: - try: - # Put your single instance Init Code Here - pass - except: - pass - module_init = 1 - module_sema.release() - -################################################################################ class testcase_miranda_Component(SSTTestCase): @@ -34,7 +13,6 @@ def initializeClass(self, testName): def setUp(self): super(type(self), self).setUp() - initializeTestModule_SingleInstance(self) # Put test based setup code here. it is called once before every test def tearDown(self): diff --git a/src/sst/elements/samba/tests/testsuite_default_Samba.py b/src/sst/elements/samba/tests/testsuite_default_Samba.py index 6f884f00f8..41f52ee0ce 100644 --- a/src/sst/elements/samba/tests/testsuite_default_Samba.py +++ b/src/sst/elements/samba/tests/testsuite_default_Samba.py @@ -3,27 +3,6 @@ from sst_unittest import * from sst_unittest_support import * -################################################################################ -# Code to support a single instance module initialize, must be called setUp method - -module_init = 0 -module_sema = threading.Semaphore() - -def initializeTestModule_SingleInstance(class_inst): - global module_init - global module_sema - - module_sema.acquire() - if module_init != 1: - try: - # Put your single instance Init Code Here - pass - except: - pass - module_init = 1 - module_sema.release() - -################################################################################ class testcase_Samba_Component(SSTTestCase): @@ -34,7 +13,6 @@ def initializeClass(self, testName): def setUp(self): super(type(self), self).setUp() - initializeTestModule_SingleInstance(self) # Put test based setup code here. it is called once before every test def tearDown(self): diff --git a/src/sst/elements/shogun/tests/testsuite_default_shogun.py b/src/sst/elements/shogun/tests/testsuite_default_shogun.py index 6a4efaa03e..dbdad9d11f 100644 --- a/src/sst/elements/shogun/tests/testsuite_default_shogun.py +++ b/src/sst/elements/shogun/tests/testsuite_default_shogun.py @@ -3,27 +3,6 @@ from sst_unittest import * from sst_unittest_support import * -################################################################################ -# Code to support a single instance module initialize, must be called setUp method - -module_init = 0 -module_sema = threading.Semaphore() - -def initializeTestModule_SingleInstance(class_inst): - global module_init - global module_sema - - module_sema.acquire() - if module_init != 1: - try: - # Put your single instance Init Code Here - pass - except: - pass - module_init = 1 - module_sema.release() - -################################################################################ class testcase_shogun(SSTTestCase): @@ -34,7 +13,6 @@ def initializeClass(self, testName): def setUp(self): super(type(self), self).setUp() - initializeTestModule_SingleInstance(self) # Put test based setup code here. it is called once before every test def tearDown(self): diff --git a/src/sst/elements/vaultsim/tests/testsuite_default_VaultSim.py b/src/sst/elements/vaultsim/tests/testsuite_default_VaultSim.py index 5955a4ff3b..f1384eee8f 100644 --- a/src/sst/elements/vaultsim/tests/testsuite_default_VaultSim.py +++ b/src/sst/elements/vaultsim/tests/testsuite_default_VaultSim.py @@ -3,27 +3,6 @@ from sst_unittest import * from sst_unittest_support import * -################################################################################ -# Code to support a single instance module initialize, must be called setUp method - -module_init = 0 -module_sema = threading.Semaphore() - -def initializeTestModule_SingleInstance(class_inst): - global module_init - global module_sema - - module_sema.acquire() - if module_init != 1: - try: - # Put your single instance Init Code Here - pass - except: - pass - module_init = 1 - module_sema.release() - -################################################################################ class testcase_VaultSim(SSTTestCase): @@ -34,7 +13,6 @@ def initializeClass(self, testName): def setUp(self): super(type(self), self).setUp() - initializeTestModule_SingleInstance(self) # Put test based setup code here. it is called once before every test def tearDown(self): From 7e0cb2e3a1e1f18016367cce34c86ba47ed29baa Mon Sep 17 00:00:00 2001 From: "Justin M. LaPre" Date: Tue, 6 Aug 2024 16:28:18 +0000 Subject: [PATCH 2/3] remove initializeTestModule_SingleInstance pt 2 --- .../ariel/tests/testsuite_default_Ariel.py | 25 +--------------- .../ariel/tests/testsuite_testio_Ariel.py | 26 +---------------- .../balar/tests/testsuite_default_balar.py | 21 +------------- .../tests/testsuite_default_cramSim.py | 25 +--------------- .../tests/testsuite_default_ember_ESshmem.py | 20 +------------ .../tests/testsuite_default_ember_nightly.py | 25 ++-------------- .../tests/testsuite_default_ember_qos.py | 23 +-------------- .../tests/testsuite_default_ember_sweep.py | 20 +------------ ...estsuite_default_memHierarchy_memHSieve.py | 25 +--------------- ...tsuite_openMP_memHierarchy_noncacheable.py | 19 ------------ .../testsuite_openMP_memHierarchy_openMP.py | 22 -------------- ...suite_sweep_memHierarchy_dir3LevelSweep.py | 19 ------------ .../testsuite_sweep_memHierarchy_dirSweep.py | 19 ------------ .../testsuite_sweep_memHierarchy_dirSweepI.py | 19 ------------ .../testsuite_sweep_memHierarchy_openMP.py | 19 ------------ .../tests/testsuite_default_prospero.py | 29 ++----------------- .../tests/testsuite_default_rdmaNic.py | 20 +------------ .../tests/testsuite_default_vanadis.py | 20 +------------ .../testsuite_default_SiriusZodiacTrace.py | 25 +--------------- 19 files changed, 16 insertions(+), 405 deletions(-) diff --git a/src/sst/elements/ariel/tests/testsuite_default_Ariel.py b/src/sst/elements/ariel/tests/testsuite_default_Ariel.py index 52e14ccf7f..2f3fbd6d24 100644 --- a/src/sst/elements/ariel/tests/testsuite_default_Ariel.py +++ b/src/sst/elements/ariel/tests/testsuite_default_Ariel.py @@ -4,29 +4,6 @@ from sst_unittest_support import * import os -################################################################################ -# Code to support a single instance module initialize, must be called setUp method - -module_init = 0 -module_sema = threading.Semaphore() - -def initializeTestModule_SingleInstance(class_inst): - global module_init - global module_sema - - module_sema.acquire() - if module_init != 1: - try: - # Put your single instance Init Code Here - class_inst._setup_ariel_test_files() - except: - pass - module_init = 1 - module_sema.release() - -################################################################################ -################################################################################ -################################################################################ class testcase_Ariel(SSTTestCase): @@ -37,8 +14,8 @@ def initializeClass(self, testName): def setUp(self): super(type(self), self).setUp() - initializeTestModule_SingleInstance(self) # Put test based setup code here. it is called once before every test + self._setup_ariel_test_files() def tearDown(self): # Put test based teardown code here. it is called once after every test diff --git a/src/sst/elements/ariel/tests/testsuite_testio_Ariel.py b/src/sst/elements/ariel/tests/testsuite_testio_Ariel.py index 2b0fc42203..03317b9135 100644 --- a/src/sst/elements/ariel/tests/testsuite_testio_Ariel.py +++ b/src/sst/elements/ariel/tests/testsuite_testio_Ariel.py @@ -5,30 +5,6 @@ import os import inspect -################################################################################ -# Code to support a single instance module initialize, must be called setUp method - -module_init = 0 -module_sema = threading.Semaphore() - -def initializeTestModule_SingleInstance(class_inst): - global module_init - global module_sema - - module_sema.acquire() - if module_init != 1: - try: - # Put your single instance Init Code Here - class_inst._setup_ariel_test_files() - except: - pass - module_init = 1 - module_sema.release() - -################################################################################ -################################################################################ -################################################################################ - class testcase_Ariel(SSTTestCase): @@ -39,8 +15,8 @@ def initializeClass(self, testName): def setUp(self): super(type(self), self).setUp() - initializeTestModule_SingleInstance(self) # Put test based setup code here. it is called once before every test + self._setup_ariel_test_files() def tearDown(self): # Put test based teardown code here. it is called once after every test diff --git a/src/sst/elements/balar/tests/testsuite_default_balar.py b/src/sst/elements/balar/tests/testsuite_default_balar.py index bb9f8b41de..dbec50f8d1 100644 --- a/src/sst/elements/balar/tests/testsuite_default_balar.py +++ b/src/sst/elements/balar/tests/testsuite_default_balar.py @@ -6,25 +6,6 @@ import os import shutil -################################################################################ -# Code to support a single instance module initialize, must be called setUp method - -module_init = 0 -module_sema = threading.Semaphore() - -def initializeTestModule_SingleInstance(class_inst): - global module_init - global module_sema - - module_sema.acquire() - if module_init != 1: - # Put your single instance Init Code Here - class_inst._setupbalarTestFiles() - module_init = 1 - - module_sema.release() - -################################################################################ class testcase_balar(SSTTestCase): @@ -35,7 +16,7 @@ def initializeClass(self, testName): def setUp(self): super(type(self), self).setUp() - initializeTestModule_SingleInstance(self) + self._setupbalarTestFiles() def tearDown(self): # Put test based teardown code here. it is called once after every test diff --git a/src/sst/elements/cramSim/tests/testsuite_default_cramSim.py b/src/sst/elements/cramSim/tests/testsuite_default_cramSim.py index 8960c6119e..5c9cfdc56f 100644 --- a/src/sst/elements/cramSim/tests/testsuite_default_cramSim.py +++ b/src/sst/elements/cramSim/tests/testsuite_default_cramSim.py @@ -6,29 +6,6 @@ import os import shutil -################################################################################ -# Code to support a single instance module initialize, must be called setUp method - -module_init = 0 -module_sema = threading.Semaphore() - -def initializeTestModule_SingleInstance(class_inst): - global module_init - global module_sema - - module_sema.acquire() - if module_init != 1: - try: - # Put your single instance Init Code Here - class_inst._setupcramSimTestFiles() - module_init = 1 - except: - pass - module_init = 1 - - module_sema.release() - -################################################################################ class testcase_cramSim_Component(SSTTestCase): @@ -39,7 +16,7 @@ def initializeClass(self, testName): def setUp(self): super(type(self), self).setUp() - initializeTestModule_SingleInstance(self) + self._setupcramSimTestFiles() def tearDown(self): # Put test based teardown code here. it is called once after every test diff --git a/src/sst/elements/ember/tests/testsuite_default_ember_ESshmem.py b/src/sst/elements/ember/tests/testsuite_default_ember_ESshmem.py index d57fa61607..ed5a4cf262 100644 --- a/src/sst/elements/ember/tests/testsuite_default_ember_ESshmem.py +++ b/src/sst/elements/ember/tests/testsuite_default_ember_ESshmem.py @@ -74,24 +74,6 @@ def gen_custom_name(testcase_func, param_num, param): parameterized.to_safe_name(str(param.args[1]))) return testcasename -################################################################################ -# Code to support a single instance module initialize, must be called setUp method - -def initializeTestModule_SingleInstance(class_inst): - global module_init - global module_sema - - module_sema.acquire() - if module_init != 1: - try: - # Put your single instance Init Code Here - class_inst._setupESshmemTestFiles() - except: - pass - module_init = 1 - module_sema.release() - -################################################################################ class testcase_Ember_ESshmem(SSTTestCase): @@ -102,7 +84,7 @@ def initializeClass(self, testName): def setUp(self): super(type(self), self).setUp() - initializeTestModule_SingleInstance(self) + self._setupESshmemTestFiles() def tearDown(self): # Put test based teardown code here. it is called once after every test diff --git a/src/sst/elements/ember/tests/testsuite_default_ember_nightly.py b/src/sst/elements/ember/tests/testsuite_default_ember_nightly.py index e558c6c05f..8190db6d1d 100644 --- a/src/sst/elements/ember/tests/testsuite_default_ember_nightly.py +++ b/src/sst/elements/ember/tests/testsuite_default_ember_nightly.py @@ -5,28 +5,6 @@ import os -################################################################################ -# Code to support a single instance module initialize, must be called setUp method - -module_init = 0 -module_sema = threading.Semaphore() - -def initializeTestModule_SingleInstance(class_inst): - global module_init - global module_sema - - module_sema.acquire() - if module_init != 1: - try: - # Put your single instance Init Code Here - class_inst._cleanupEmberTestFiles() - class_inst._setupEmberTestFiles() - except: - pass - module_init = 1 - module_sema.release() - -################################################################################ class testcase_EmberNightly(SSTTestCase): @@ -37,7 +15,8 @@ def initializeClass(self, testName): def setUp(self): super(type(self), self).setUp() - initializeTestModule_SingleInstance(self) + self._cleanupEmberTestFiles() + self._setupEmberTestFiles() def tearDown(self): # Put test based teardown code here. it is called once after every test diff --git a/src/sst/elements/ember/tests/testsuite_default_ember_qos.py b/src/sst/elements/ember/tests/testsuite_default_ember_qos.py index 28d15b32e0..348a9b3d35 100644 --- a/src/sst/elements/ember/tests/testsuite_default_ember_qos.py +++ b/src/sst/elements/ember/tests/testsuite_default_ember_qos.py @@ -5,27 +5,6 @@ import os -################################################################################ -# Code to support a single instance module initialize, must be called setUp method - -module_init = 0 -module_sema = threading.Semaphore() - -def initializeTestModule_SingleInstance(class_inst): - global module_init - global module_sema - - module_sema.acquire() - if module_init != 1: - try: - # Put your single instance Init Code Here - class_inst._setupQOSTestFiles() - except: - pass - module_init = 1 - module_sema.release() - -################################################################################ class testcase_QOS(SSTTestCase): @@ -36,7 +15,7 @@ def initializeClass(self, testName): def setUp(self): super(type(self), self).setUp() - initializeTestModule_SingleInstance(self) + self._setupQOSTestFiles() def tearDown(self): # Put test based teardown code here. it is called once after every test diff --git a/src/sst/elements/ember/tests/testsuite_default_ember_sweep.py b/src/sst/elements/ember/tests/testsuite_default_ember_sweep.py index 7d74ad3ab3..64cc370175 100644 --- a/src/sst/elements/ember/tests/testsuite_default_ember_sweep.py +++ b/src/sst/elements/ember/tests/testsuite_default_ember_sweep.py @@ -135,24 +135,6 @@ def gen_custom_name(testcase_func, param_num, param): parameterized.to_safe_name(str(param.args[1]))) return testcasename -################################################################################ -# Code to support a single instance module initialize, must be called setUp method - -def initializeTestModule_SingleInstance(class_inst): - global module_init - global module_sema - - module_sema.acquire() - if module_init != 1: - try: - # Put your single instance Init Code Here - class_inst._setupEmberTestFiles() - except: - pass - module_init = 1 - module_sema.release() - -################################################################################ class testcase_EmberSweep(SSTTestCase): @@ -163,7 +145,7 @@ def initializeClass(self, testName): def setUp(self): super(type(self), self).setUp() - initializeTestModule_SingleInstance(self) + self._setupEmberTestFiles() def tearDown(self): # Put test based teardown code here. it is called once after every test diff --git a/src/sst/elements/memHierarchy/tests/testsuite_default_memHierarchy_memHSieve.py b/src/sst/elements/memHierarchy/tests/testsuite_default_memHierarchy_memHSieve.py index 27cc68da04..ef49bd89e2 100644 --- a/src/sst/elements/memHierarchy/tests/testsuite_default_memHierarchy_memHSieve.py +++ b/src/sst/elements/memHierarchy/tests/testsuite_default_memHierarchy_memHSieve.py @@ -7,29 +7,6 @@ import fnmatch import csv -################################################################################ -# Code to support a single instance module initialize, must be called setUp method - -module_init = 0 -module_sema = threading.Semaphore() - -def initializeTestModule_SingleInstance(class_inst): - global module_init - global module_sema - - module_sema.acquire() - if module_init != 1: - try: - # Put your single instance Init Code Here - class_inst._setup_sieve_test_files() - except: - pass - module_init = 1 - module_sema.release() - -################################################################################ -################################################################################ -################################################################################ class testcase_memHierarchy_memHSieve(SSTTestCase): @@ -40,8 +17,8 @@ def initializeClass(self, testName): def setUp(self): super(type(self), self).setUp() - initializeTestModule_SingleInstance(self) # Put test based setup code here. it is called once before every test + self._setup_sieve_test_files() def tearDown(self): # Put test based teardown code here. it is called once after every test diff --git a/src/sst/elements/memHierarchy/tests/testsuite_openMP_memHierarchy_noncacheable.py b/src/sst/elements/memHierarchy/tests/testsuite_openMP_memHierarchy_noncacheable.py index 28cd201a34..1ec9dd6655 100644 --- a/src/sst/elements/memHierarchy/tests/testsuite_openMP_memHierarchy_noncacheable.py +++ b/src/sst/elements/memHierarchy/tests/testsuite_openMP_memHierarchy_noncacheable.py @@ -6,24 +6,6 @@ module_init = 0 module_sema = threading.Semaphore() -################################################################################ -# Code to support a single instance module initialize, must be called setUp method - -def initializeTestModule_SingleInstance(class_inst): - global module_init - global module_sema - - module_sema.acquire() - if module_init != 1: - try: - # Put your single instance Init Code Here - pass - except: - pass - module_init = 1 - module_sema.release() - -################################################################################ class testcase_memH_openMP_noncacheable(SSTTestCase): @@ -34,7 +16,6 @@ def initializeClass(self, testName): def setUp(self): super(type(self), self).setUp() - initializeTestModule_SingleInstance(self) def tearDown(self): # Put test based teardown code here. it is called once after every test diff --git a/src/sst/elements/memHierarchy/tests/testsuite_openMP_memHierarchy_openMP.py b/src/sst/elements/memHierarchy/tests/testsuite_openMP_memHierarchy_openMP.py index 7827666a3b..08e558309b 100644 --- a/src/sst/elements/memHierarchy/tests/testsuite_openMP_memHierarchy_openMP.py +++ b/src/sst/elements/memHierarchy/tests/testsuite_openMP_memHierarchy_openMP.py @@ -3,27 +3,6 @@ from sst_unittest import * from sst_unittest_support import * -module_init = 0 -module_sema = threading.Semaphore() - -################################################################################ -# Code to support a single instance module initialize, must be called setUp method - -def initializeTestModule_SingleInstance(class_inst): - global module_init - global module_sema - - module_sema.acquire() - if module_init != 1: - try: - # Put your single instance Init Code Here - pass - except: - pass - module_init = 1 - module_sema.release() - -################################################################################ class testcase_memH_openMP_openMP(SSTTestCase): @@ -34,7 +13,6 @@ def initializeClass(self, testName): def setUp(self): super(type(self), self).setUp() - initializeTestModule_SingleInstance(self) def tearDown(self): # Put test based teardown code here. it is called once after every test diff --git a/src/sst/elements/memHierarchy/tests/testsuite_sweep_memHierarchy_dir3LevelSweep.py b/src/sst/elements/memHierarchy/tests/testsuite_sweep_memHierarchy_dir3LevelSweep.py index 7d2b189c8b..79e18ffdb3 100644 --- a/src/sst/elements/memHierarchy/tests/testsuite_sweep_memHierarchy_dir3LevelSweep.py +++ b/src/sst/elements/memHierarchy/tests/testsuite_sweep_memHierarchy_dir3LevelSweep.py @@ -145,24 +145,6 @@ def gen_custom_name(testcase_func, param_num, param): ) return testcasename -################################################################################ -# Code to support a single instance module initialize, must be called setUp method - -def initializeTestModule_SingleInstance(class_inst): - global module_init - global module_sema - - module_sema.acquire() - if module_init != 1: - try: - # Put your single instance Init Code Here - pass - except: - pass - module_init = 1 - module_sema.release() - -################################################################################ class testcase_memH_sweep_dir3levelsweep(SSTTestCase): @@ -173,7 +155,6 @@ def initializeClass(self, testName): def setUp(self): super(type(self), self).setUp() - initializeTestModule_SingleInstance(self) def tearDown(self): # Put test based teardown code here. it is called once after every test diff --git a/src/sst/elements/memHierarchy/tests/testsuite_sweep_memHierarchy_dirSweep.py b/src/sst/elements/memHierarchy/tests/testsuite_sweep_memHierarchy_dirSweep.py index 827a26e96e..20c751cdbb 100644 --- a/src/sst/elements/memHierarchy/tests/testsuite_sweep_memHierarchy_dirSweep.py +++ b/src/sst/elements/memHierarchy/tests/testsuite_sweep_memHierarchy_dirSweep.py @@ -120,24 +120,6 @@ def gen_custom_name(testcase_func, param_num, param): parameterized.to_safe_name(str(param.args[9]))) # prefetch return testcasename -################################################################################ -# Code to support a single instance module initialize, must be called setUp method - -def initializeTestModule_SingleInstance(class_inst): - global module_init - global module_sema - - module_sema.acquire() - if module_init != 1: - try: - # Put your single instance Init Code Here - pass - except: - pass - module_init = 1 - module_sema.release() - -################################################################################ class testcase_memH_sweep_dirsweep(SSTTestCase): @@ -148,7 +130,6 @@ def initializeClass(self, testName): def setUp(self): super(type(self), self).setUp() - initializeTestModule_SingleInstance(self) def tearDown(self): # Put test based teardown code here. it is called once after every test diff --git a/src/sst/elements/memHierarchy/tests/testsuite_sweep_memHierarchy_dirSweepI.py b/src/sst/elements/memHierarchy/tests/testsuite_sweep_memHierarchy_dirSweepI.py index 985e6c0c26..acf4b2bbd1 100644 --- a/src/sst/elements/memHierarchy/tests/testsuite_sweep_memHierarchy_dirSweepI.py +++ b/src/sst/elements/memHierarchy/tests/testsuite_sweep_memHierarchy_dirSweepI.py @@ -122,24 +122,6 @@ def gen_custom_name(testcase_func, param_num, param): parameterized.to_safe_name(str(param.args[9]))) # prefetch return testcasename -################################################################################ -# Code to support a single instance module initialize, must be called setUp method - -def initializeTestModule_SingleInstance(class_inst): - global module_init - global module_sema - - module_sema.acquire() - if module_init != 1: - try: - # Put your single instance Init Code Here - pass - except: - pass - module_init = 1 - module_sema.release() - -################################################################################ class testcase_memH_sweep_dirsweepI(SSTTestCase): @@ -150,7 +132,6 @@ def initializeClass(self, testName): def setUp(self): super(type(self), self).setUp() - initializeTestModule_SingleInstance(self) def tearDown(self): # Put test based teardown code here. it is called once after every test diff --git a/src/sst/elements/memHierarchy/tests/testsuite_sweep_memHierarchy_openMP.py b/src/sst/elements/memHierarchy/tests/testsuite_sweep_memHierarchy_openMP.py index 06510f67d7..780f6218e9 100644 --- a/src/sst/elements/memHierarchy/tests/testsuite_sweep_memHierarchy_openMP.py +++ b/src/sst/elements/memHierarchy/tests/testsuite_sweep_memHierarchy_openMP.py @@ -120,24 +120,6 @@ def gen_custom_name(testcase_func, param_num, param): parameterized.to_safe_name(str(param.args[9]))) # prefetch return testcasename -################################################################################ -# Code to support a single instance module initialize, must be called setUp method - -def initializeTestModule_SingleInstance(class_inst): - global module_init - global module_sema - - module_sema.acquire() - if module_init != 1: - try: - # Put your single instance Init Code Here - pass - except: - pass - module_init = 1 - module_sema.release() - -################################################################################ class testcase_memH_sweep_openMP(SSTTestCase): @@ -148,7 +130,6 @@ def initializeClass(self, testName): def setUp(self): super(type(self), self).setUp() - initializeTestModule_SingleInstance(self) def tearDown(self): # Put test based teardown code here. it is called once after every test diff --git a/src/sst/elements/prospero/tests/testsuite_default_prospero.py b/src/sst/elements/prospero/tests/testsuite_default_prospero.py index 8071e1a6b9..7ee46b5a3c 100644 --- a/src/sst/elements/prospero/tests/testsuite_default_prospero.py +++ b/src/sst/elements/prospero/tests/testsuite_default_prospero.py @@ -10,31 +10,6 @@ WITH_TIMINGDRAM = True NO_TIMINGDRAM = False -################################################################################ -# Code to support a single instance module initialize, must be called setUp method - -module_init = 0 -module_sema = threading.Semaphore() - -def initializeTestModule_SingleInstance(class_inst): - global module_init - global module_sema - - module_sema.acquire() - if module_init != 1: - try: - # Put your single instance Init Code Here - class_inst._setup_prospero_test_dirs() - class_inst._create_prospero_PIN_trace_files() - class_inst._download_prospero_TAR_trace_files() - except: - pass - module_init = 1 - module_sema.release() - -################################################################################ -################################################################################ -################################################################################ class testcase_prospero(SSTTestCase): @@ -45,8 +20,10 @@ def initializeClass(self, testName): def setUp(self): super(type(self), self).setUp() - initializeTestModule_SingleInstance(self) # Put test based setup code here. it is called once before every test + self._setup_prospero_test_dirs() + self._create_prospero_PIN_trace_files() + self._download_prospero_TAR_trace_files() def tearDown(self): # Put test based teardown code here. it is called once after every test diff --git a/src/sst/elements/rdmaNic/tests/testsuite_default_rdmaNic.py b/src/sst/elements/rdmaNic/tests/testsuite_default_rdmaNic.py index 16a7e20cb6..e69c6bee51 100644 --- a/src/sst/elements/rdmaNic/tests/testsuite_default_rdmaNic.py +++ b/src/sst/elements/rdmaNic/tests/testsuite_default_rdmaNic.py @@ -63,24 +63,6 @@ def gen_custom_name(testcase_func, param_num, param): parameterized.to_safe_name(str(param.args[1]))) return testcasename -################################################################################ -# Code to support a single instance module initialize, must be called setUp method - -def initializeTestModule_SingleInstance(class_inst): - global module_init - global module_sema - - module_sema.acquire() - if module_init != 1: - try: - # Put your single instance Init Code Here - class_inst._setupRdmaNicTestFiles() - except: - pass - module_init = 1 - module_sema.release() - -################################################################################ class testcase_rdmaNic(SSTTestCase): @@ -91,8 +73,8 @@ def initializeClass(self, testName): def setUp(self): super(type(self), self).setUp() - initializeTestModule_SingleInstance(self) # Put test based setup code here. it is called once before every test + self._setupRdmaNicTestFiles() def tearDown(self): # Put test based teardown code here. it is called once after every test diff --git a/src/sst/elements/vanadis/tests/testsuite_default_vanadis.py b/src/sst/elements/vanadis/tests/testsuite_default_vanadis.py index 52830be927..47e1031cf3 100644 --- a/src/sst/elements/vanadis/tests/testsuite_default_vanadis.py +++ b/src/sst/elements/vanadis/tests/testsuite_default_vanadis.py @@ -124,24 +124,6 @@ def gen_custom_name(testcase_func, param_num, param): parameterized.to_safe_name(str(param.args[1]))) return testcasename -################################################################################ -# Code to support a single instance module initialize, must be called setUp method - -def initializeTestModule_SingleInstance(class_inst): - global module_init - global module_sema - - module_sema.acquire() - if module_init != 1: - try: - # Put your single instance Init Code Here - class_inst._setupTests() - except: - pass - module_init = 1 - module_sema.release() - -################################################################################ class testcase_vanadis(SSTTestCase): @@ -152,8 +134,8 @@ def initializeClass(self, testName): def setUp(self): super(type(self), self).setUp() - initializeTestModule_SingleInstance(self) # Put test based setup code here. it is called once before every test + self._setupTests() def tearDown(self): # Put test based teardown code here. it is called once after every test diff --git a/src/sst/elements/zodiac/test/testsuite_default_SiriusZodiacTrace.py b/src/sst/elements/zodiac/test/testsuite_default_SiriusZodiacTrace.py index 3d5ffc954e..d40fb8beaa 100644 --- a/src/sst/elements/zodiac/test/testsuite_default_SiriusZodiacTrace.py +++ b/src/sst/elements/zodiac/test/testsuite_default_SiriusZodiacTrace.py @@ -6,29 +6,6 @@ #import os #import shutil -################################################################################ -# Code to support a single instance module initialize, must be called setUp method - -module_init = 0 -module_sema = threading.Semaphore() - -def initializeTestModule_SingleInstance(class_inst): - global module_init - global module_sema - - module_sema.acquire() - if module_init != 1: - try: - # Put your single instance Init Code Here - class_inst._setupSiriusZodiacTraceTestFiles() - module_init = 1 - except: - pass - module_init = 1 - - module_sema.release() - -################################################################################ class testcase_SiriusZodiacTrace(SSTTestCase): @@ -39,7 +16,7 @@ def initializeClass(self, testName): def setUp(self): super(type(self), self).setUp() - initializeTestModule_SingleInstance(self) + self._setupSiriusZodiacTraceTestFiles() def tearDown(self): # Put test based teardown code here. it is called once after every test From b3bfadb7bf2f5df98c5c825d411ddce57d1e9ffb Mon Sep 17 00:00:00 2001 From: "Justin M. LaPre" Date: Tue, 6 Aug 2024 16:34:23 +0000 Subject: [PATCH 3/3] missed some boilerplate --- .../cacheTracer/tests/testsuite_default_cacheTracer.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/sst/elements/cacheTracer/tests/testsuite_default_cacheTracer.py b/src/sst/elements/cacheTracer/tests/testsuite_default_cacheTracer.py index 0719ac74b3..aee8602dc3 100644 --- a/src/sst/elements/cacheTracer/tests/testsuite_default_cacheTracer.py +++ b/src/sst/elements/cacheTracer/tests/testsuite_default_cacheTracer.py @@ -3,14 +3,6 @@ from sst_unittest import * from sst_unittest_support import * -################################################################################ -# Code to support a single instance module initialize, must be called setUp method - -module_init = 0 -module_sema = threading.Semaphore() - - -################################################################################ class testcase_cacheTracer_Component(SSTTestCase):