annotate python/testzcc.py @ 243:ef683881c64e

Remove various files
author Windel Bouwman
date Tue, 23 Jul 2013 16:50:02 +0200
parents 81752b0f85a5
children f5fba5b554d7
rev   line source
208
4cb47d80fd1f Added zcc test
Windel Bouwman
parents:
diff changeset
1 import unittest
237
81752b0f85a5 Added burn led test program
Windel Bouwman
parents: 235
diff changeset
2 import glob
208
4cb47d80fd1f Added zcc test
Windel Bouwman
parents:
diff changeset
3 import zcc
4cb47d80fd1f Added zcc test
Windel Bouwman
parents:
diff changeset
4
4cb47d80fd1f Added zcc test
Windel Bouwman
parents:
diff changeset
5 class ZccTestCase(unittest.TestCase):
4cb47d80fd1f Added zcc test
Windel Bouwman
parents:
diff changeset
6 """ Tests the compiler driver """
4cb47d80fd1f Added zcc test
Windel Bouwman
parents:
diff changeset
7
237
81752b0f85a5 Added burn led test program
Windel Bouwman
parents: 235
diff changeset
8 def do(self, fn):
208
4cb47d80fd1f Added zcc test
Windel Bouwman
parents:
diff changeset
9 """ Compile blink.c3 """
235
ff40407c0240 Fix ALabel to Label
Windel Bouwman
parents: 208
diff changeset
10 #args = zcc.parser.parse_args(['-d', 'stm32f4/blink.c3'])
237
81752b0f85a5 Added burn led test program
Windel Bouwman
parents: 235
diff changeset
11 args = zcc.parser.parse_args([fn])
208
4cb47d80fd1f Added zcc test
Windel Bouwman
parents:
diff changeset
12 zcc.main(args)
4cb47d80fd1f Added zcc test
Windel Bouwman
parents:
diff changeset
13
237
81752b0f85a5 Added burn led test program
Windel Bouwman
parents: 235
diff changeset
14 def testExamples(self):
81752b0f85a5 Added burn led test program
Windel Bouwman
parents: 235
diff changeset
15 """ Test all examples in the c3/examples directory """
81752b0f85a5 Added burn led test program
Windel Bouwman
parents: 235
diff changeset
16 example_filenames = glob.glob('./stm32f4/*.c3')
81752b0f85a5 Added burn led test program
Windel Bouwman
parents: 235
diff changeset
17 for filename in example_filenames:
81752b0f85a5 Added burn led test program
Windel Bouwman
parents: 235
diff changeset
18 self.do(filename)
81752b0f85a5 Added burn led test program
Windel Bouwman
parents: 235
diff changeset
19
208
4cb47d80fd1f Added zcc test
Windel Bouwman
parents:
diff changeset
20 if __name__ == '__main__':
4cb47d80fd1f Added zcc test
Windel Bouwman
parents:
diff changeset
21 unittest.main()
4cb47d80fd1f Added zcc test
Windel Bouwman
parents:
diff changeset
22