mirror of
https://github.com/RRZE-HPC/OSACA.git
synced 2025-12-15 16:40:05 +01:00
Workflow file includes new kenrcraft branch. Also changed checks for 'bad_operands' since they don't fit class style attributes
This commit is contained in:
@@ -199,6 +199,7 @@ class TestCLI(unittest.TestCase):
|
||||
)
|
||||
output = StringIO()
|
||||
osaca.run(args, output_file=output)
|
||||
|
||||
# WARNING for length
|
||||
self.assertTrue(
|
||||
output.getvalue().count(
|
||||
@@ -229,6 +230,7 @@ class TestCLI(unittest.TestCase):
|
||||
osaca.run(args, output_file=output)
|
||||
self.assertTrue(output.getvalue().count("WARNING: LCD analysis timed out") == 0)
|
||||
|
||||
|
||||
def test_lines_arg(self):
|
||||
# Run tests with --lines option
|
||||
parser = osaca.create_parser()
|
||||
|
||||
@@ -97,15 +97,15 @@ class TestDBInterface(unittest.TestCase):
|
||||
entries = dbi._get_ibench_output(input_data, "x86")
|
||||
self.assertEqual(len(entries), 3)
|
||||
for _, e in entries.items():
|
||||
self.assertIsNotNone(e["throughput"])
|
||||
self.assertIsNotNone(e["latency"])
|
||||
self.assertIsNotNone(e.throughput)
|
||||
self.assertIsNotNone(e.latency)
|
||||
with open(self._find_file("ibench_import_aarch64.dat")) as input_file:
|
||||
input_data = input_file.readlines()
|
||||
entries = dbi._get_ibench_output(input_data, "aarch64")
|
||||
self.assertEqual(len(entries), 4)
|
||||
for _, e in entries.items():
|
||||
self.assertIsNotNone(e["throughput"])
|
||||
self.assertIsNotNone(e["latency"])
|
||||
self.assertIsNotNone(e.throughput)
|
||||
self.assertIsNotNone(e.latency)
|
||||
|
||||
def test_asmbench_import(self):
|
||||
# only check import without dumping the DB file (takes too much time)
|
||||
@@ -114,15 +114,15 @@ class TestDBInterface(unittest.TestCase):
|
||||
entries = dbi._get_asmbench_output(input_data, "x86")
|
||||
self.assertEqual(len(entries), 3)
|
||||
for _, e in entries.items():
|
||||
self.assertIsNotNone(e["throughput"])
|
||||
self.assertIsNotNone(e["latency"])
|
||||
self.assertIsNotNone(e.throughput)
|
||||
self.assertIsNotNone(e.latency)
|
||||
with open(self._find_file("asmbench_import_aarch64.dat")) as input_file:
|
||||
input_data = input_file.readlines()
|
||||
entries = dbi._get_asmbench_output(input_data, "aarch64")
|
||||
self.assertEqual(len(entries), 4)
|
||||
for _, e in entries.items():
|
||||
self.assertIsNotNone(e["throughput"])
|
||||
self.assertIsNotNone(e["latency"])
|
||||
self.assertIsNotNone(e.throughput)
|
||||
self.assertIsNotNone(e.latency)
|
||||
# remove empty line => no import since broken format
|
||||
del input_data[3]
|
||||
entries = dbi._get_asmbench_output(input_data, "aarch64")
|
||||
|
||||
@@ -127,8 +127,8 @@ class TestParserAArch64(unittest.TestCase):
|
||||
self.assertIsNone(parsed_4.operands[1].offset)
|
||||
self.assertEqual(parsed_4.operands[1].base.name, "sp")
|
||||
self.assertEqual(parsed_4.operands[1].base.prefix, "x")
|
||||
self.assertEqual(parsed_4.operands[1].index["name"], "1")
|
||||
self.assertEqual(parsed_4.operands[1].index["prefix"], "x")
|
||||
self.assertEqual(parsed_4.operands[1].index.name, "1")
|
||||
self.assertEqual(parsed_4.operands[1].index.prefix, "x")
|
||||
self.assertEqual(parsed_4.operands[1].scale, 16)
|
||||
self.assertEqual(parsed_4.operands[0].name, "28")
|
||||
self.assertEqual(parsed_4.operands[0].prefix, "x")
|
||||
|
||||
Reference in New Issue
Block a user