diff test/testzcc.py @ 292:534b94b40aa8

Fixup reorganize
author Windel Bouwman
date Wed, 27 Nov 2013 08:06:42 +0100
parents bd2593de3ff8
children 158068af716c
line wrap: on
line diff
--- a/test/testzcc.py	Sun Nov 24 11:24:15 2013 +0100
+++ b/test/testzcc.py	Wed Nov 27 08:06:42 2013 +0100
@@ -1,10 +1,10 @@
 import unittest
-import glob
 import zcc
 import outstream
 import ppci
 import io
 import os
+import target
 
 
 class ZccTestCase(unittest.TestCase):
@@ -16,6 +16,8 @@
         for fn in imps:
             arg_list.append('-i')
             arg_list.append(os.path.join(basedir, fn))
+        arg_list.append('--target')
+        arg_list.append('arm')
         args = zcc.parser.parse_args(arg_list)
         self.assertEqual(0, zcc.main(args))
 
@@ -39,7 +41,8 @@
         f = io.StringIO(src)
         diag = ppci.DiagnosticsManager()
         outs = outstream.TextOutputStream()
-        self.assertTrue(zcc.zcc([f], [], outs, diag))
+        tg = target.armtarget
+        self.assertTrue(zcc.zcc([f], [], tg, outs, diag))
         code = outs.getSection('code')
         self.assertEqual(0x08000000, code.address)
         data = outs.getSection('data')