comparison test/testsamples.py @ 375:19eacf4f7270

Started on memory manager
author Windel Bouwman
date Sun, 23 Mar 2014 15:44:06 +0100
parents 72a3b646d543
children 9667d78ba79e
comparison
equal deleted inserted replaced
374:72a3b646d543 375:19eacf4f7270
1 import unittest 1 import unittest
2 import os 2 import os
3 import io 3 import io
4 from testemulation import runQemu 4 from testemulation import runQemu, has_qemu
5 from testzcc import relpath 5 from testzcc import relpath
6 from ppci.tasks import TaskRunner 6 from ppci.tasks import TaskRunner
7 from ppci.buildtasks import Assemble, Compile, Link 7 from ppci.buildtasks import Assemble, Compile, Link
8 from ppci.objectfile import ObjectFile 8 from ppci.objectfile import ObjectFile
9 9
113 res = "".join("G=0x{0:08X}\n".format(a) for a in [1,2,7,8,13]) 113 res = "".join("G=0x{0:08X}\n".format(a) for a in [1,2,7,8,13])
114 self.do(snippet, res) 114 self.do(snippet, res)
115 115
116 116
117 class TestSamplesOnVexpress(unittest.TestCase, Samples): 117 class TestSamplesOnVexpress(unittest.TestCase, Samples):
118 def setUp(self):
119 if not has_qemu():
120 self.skipTest('Not running qemu tests')
121
118 def do(self, src, expected_output): 122 def do(self, src, expected_output):
119 # Construct binary file from snippet: 123 # Construct binary file from snippet:
120 o1 = ObjectFile() 124 o1 = ObjectFile()
121 o2 = ObjectFile() 125 o2 = ObjectFile()
122 asmb = Assemble(io.StringIO(startercode), 'arm', o1) 126 asmb = Assemble(io.StringIO(startercode), 'arm', o1)