Skip to content

Commit

Permalink
remove initializeTestModule_SingleInstance() ...
Browse files Browse the repository at this point in the history
from subclasses.  The implementations are basically identical.
  • Loading branch information
jmlapre committed Aug 5, 2024
1 parent 65ed209 commit 24b26aa
Show file tree
Hide file tree
Showing 19 changed files with 33 additions and 321 deletions.
19 changes: 1 addition & 18 deletions tests/testsuite_default_Checkpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,12 @@
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:
# Put your single instance Init Code Here
module_init = 1
module_sema.release()

################################################################################

class testcase_Checkpoint(SSTTestCase):

def setUp(self):
super(type(self), self).setUp()
initializeTestModule_SingleInstance(self)
type(self).initializeTestModule_SingleInstance()
# Put test based setup code here. it is called once before every test

def tearDown(self):
Expand Down
19 changes: 1 addition & 18 deletions tests/testsuite_default_Component.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,12 @@
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:
# Put your single instance Init Code Here
module_init = 1
module_sema.release()

################################################################################

class testcase_Component(SSTTestCase):

def setUp(self):
super(type(self), self).setUp()
initializeTestModule_SingleInstance(self)
type(self).initializeTestModule_SingleInstance()
# Put test based setup code here. it is called once before every test

def tearDown(self):
Expand Down
19 changes: 1 addition & 18 deletions tests/testsuite_default_Links.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,12 @@
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:
# Put your single instance Init Code Here
module_init = 1
module_sema.release()

################################################################################

class testcase_Links(SSTTestCase):

def setUp(self):
super(type(self), self).setUp()
initializeTestModule_SingleInstance(self)
type(self).initializeTestModule_SingleInstance()
# Put test based setup code here. it is called once before every test

def tearDown(self):
Expand Down
19 changes: 1 addition & 18 deletions tests/testsuite_default_MemPoolTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,12 @@
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:
# Put your single instance Init Code Here
module_init = 1
module_sema.release()

################################################################################

class testcase_StatisticComponent(SSTTestCase):

def setUp(self):
super(type(self), self).setUp()
initializeTestModule_SingleInstance(self)
type(self).initializeTestModule_SingleInstance()
# Put test based setup code here. it is called once before every test

def tearDown(self):
Expand Down
19 changes: 1 addition & 18 deletions tests/testsuite_default_Module.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,12 @@
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:
# Put your single instance Init Code Here
module_init = 1
module_sema.release()

################################################################################

class testcase_Module(SSTTestCase):

def setUp(self):
super(type(self), self).setUp()
initializeTestModule_SingleInstance(self)
type(self).initializeTestModule_SingleInstance()
# Put test based setup code here. it is called once before every test

def tearDown(self):
Expand Down
19 changes: 1 addition & 18 deletions tests/testsuite_default_Output.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,12 @@
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:
# Put your single instance Init Code Here
module_init = 1
module_sema.release()

################################################################################

class testcase_Output(SSTTestCase):

def setUp(self):
super(type(self), self).setUp()
initializeTestModule_SingleInstance(self)
type(self).initializeTestModule_SingleInstance()
# Put test based setup code here. it is called once before every test

def tearDown(self):
Expand Down
19 changes: 1 addition & 18 deletions tests/testsuite_default_ParamComponent.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,12 @@
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:
# Put your single instance Init Code Here
module_init = 1
module_sema.release()

################################################################################

class testcase_ParamComponent(SSTTestCase):

def setUp(self):
super(type(self), self).setUp()
initializeTestModule_SingleInstance(self)
type(self).initializeTestModule_SingleInstance()
# Put test based setup code here. it is called once before every test

def tearDown(self):
Expand Down
19 changes: 1 addition & 18 deletions tests/testsuite_default_PerfComponent.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,12 @@
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:
# Put your single instance Init Code Here
module_init = 1
module_sema.release()

################################################################################

class testcase_PerfComponent(SSTTestCase):

def setUp(self):
super(type(self), self).setUp()
initializeTestModule_SingleInstance(self)
type(self).initializeTestModule_SingleInstance()
# Put test based setup code here. it is called once before every test

def tearDown(self):
Expand Down
19 changes: 1 addition & 18 deletions tests/testsuite_default_RNGComponent.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,12 @@
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:
# Put your single instance Init Code Here
module_init = 1
module_sema.release()

################################################################################

class testcase_RNGComponent(SSTTestCase):

def setUp(self):
super(type(self), self).setUp()
initializeTestModule_SingleInstance(self)
type(self).initializeTestModule_SingleInstance()
# Put test based setup code here. it is called once before every test

def tearDown(self):
Expand Down
15 changes: 15 additions & 0 deletions tests/testsuite_default_RealTime.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from sst_unittest import *
from sst_unittest_support import *


################################################################################
# These tests test the RealTime features of SST including:
# - SIGUSR1 / SIGUSR2
Expand All @@ -28,6 +29,20 @@

class testcase_Signals(SSTTestCase):

def initializeClass(self, testName):
super(type(self), self).initializeClass(testName)
# Put test based setup code here. it is called before testing starts
# NOTE: This method is called once for every test

def setUp(self):
super(type(self), self).setUp()
type(self).initializeTestModule_SingleInstance()
# Put test based setup code here. it is called once before every test

def tearDown(self):
# Put test based teardown code here. it is called once after every test
super(type(self), self).tearDown()

#####
def test_RealTime_SIGUSR1(self):
testsuitedir = self.get_testsuite_dir()
Expand Down
19 changes: 1 addition & 18 deletions tests/testsuite_default_Serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,12 @@
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:
# Put your single instance Init Code Here
module_init = 1
module_sema.release()

################################################################################

class testcase_Serialization(SSTTestCase):

def setUp(self):
super(type(self), self).setUp()
initializeTestModule_SingleInstance(self)
type(self).initializeTestModule_SingleInstance()
# Put test based setup code here. it is called once before every test

def tearDown(self):
Expand Down
19 changes: 1 addition & 18 deletions tests/testsuite_default_SharedObject.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,12 @@
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:
# Put your single instance Init Code Here
module_init = 1
module_sema.release()

################################################################################

class testcase_SharedObject(SSTTestCase):

def setUp(self):
super(type(self), self).setUp()
initializeTestModule_SingleInstance(self)
type(self).initializeTestModule_SingleInstance()
# Put test based setup code here. it is called once before every test

def tearDown(self):
Expand Down
Loading

0 comments on commit 24b26aa

Please sign in to comment.