Script updated
This commit is contained in:
@@ -58,6 +58,7 @@ simdir = builddir + '/simulator'
|
||||
mcConfigPath = rootdir + '/DRAMSys/library/resources/configs/mcconfigs'
|
||||
memSpecsPath = rootdir + '/DRAMSys/library/resources/configs/memspecs'
|
||||
baseConfigPath = workingdir + '/baseconfig.xml'
|
||||
qmakeProjFile = '../DRAMSys/DRAMSys.pro'
|
||||
|
||||
|
||||
def build_project():
|
||||
@@ -65,8 +66,7 @@ def build_project():
|
||||
shutil.rmtree(builddir)
|
||||
os.makedirs(builddir)
|
||||
os.chdir(builddir)
|
||||
qmakeprojfile = '../DRAMSys/dram.vp.system.pro'
|
||||
subprocess.call(['qmake', qmakeprojfile], stdout=out, stderr=errout)
|
||||
subprocess.call(['qmake', qmakeProjFile], stdout=out, stderr=errout)
|
||||
makejobs = '-j' + str(multiprocessing.cpu_count())
|
||||
ret = subprocess.call(['make', makejobs], stdout=out, stderr=errout)
|
||||
return ret
|
||||
@@ -88,12 +88,13 @@ class TestRun(unittest.TestCase):
|
||||
def test_run_without_arguments(self):
|
||||
""" running dramSys without arguments returns 0 """
|
||||
os.chdir(simdir)
|
||||
self.assertEqual(subprocess.call(['./dramSys'], stdout=out), 0)
|
||||
self.assertEqual(subprocess.call(['./DRAMSys'], stdout=out), 0)
|
||||
|
||||
def tearDown(self):
|
||||
shutil.rmtree(builddir)
|
||||
|
||||
|
||||
@unittest.skip("skipping this")
|
||||
class TestOutput(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.tfd, self.tfpath = tempfile.mkstemp()
|
||||
@@ -110,7 +111,7 @@ class TestOutput(unittest.TestCase):
|
||||
""" running dramSys with base config, output match reference """
|
||||
os.chdir(simdir)
|
||||
with open(self.tfpath, 'w') as f:
|
||||
self.assertEqual(subprocess.call(['./dramSys', baseConfigPath],
|
||||
self.assertEqual(subprocess.call(['./DRAMSys', baseConfigPath],
|
||||
stdout=f), 0)
|
||||
f.close()
|
||||
tout = self.filter_output(self.tfpath)
|
||||
|
||||
Reference in New Issue
Block a user