comparison python/testzcc.py @ 237:81752b0f85a5

Added burn led test program
author Windel Bouwman
date Wed, 17 Jul 2013 22:31:54 +0200
parents ff40407c0240
children f5fba5b554d7
comparison
equal deleted inserted replaced
236:8786811a5a59 237:81752b0f85a5
1 import unittest 1 import unittest
2 import glob
2 import zcc 3 import zcc
3 4
4 class ZccTestCase(unittest.TestCase): 5 class ZccTestCase(unittest.TestCase):
5 """ Tests the compiler driver """ 6 """ Tests the compiler driver """
6 7
7 def testBlinkDemo(self): 8 def do(self, fn):
8 """ Compile blink.c3 """ 9 """ Compile blink.c3 """
9 #args = zcc.parser.parse_args(['-d', 'stm32f4/blink.c3']) 10 #args = zcc.parser.parse_args(['-d', 'stm32f4/blink.c3'])
10 args = zcc.parser.parse_args(['stm32f4/blink.c3']) 11 args = zcc.parser.parse_args([fn])
11 zcc.main(args) 12 zcc.main(args)
13
14 def testExamples(self):
15 """ Test all examples in the c3/examples directory """
16 example_filenames = glob.glob('./stm32f4/*.c3')
17 for filename in example_filenames:
18 self.do(filename)
12 19
13 if __name__ == '__main__': 20 if __name__ == '__main__':
14 unittest.main() 21 unittest.main()
15 22