Mercurial > lcfOS
comparison test/testzcc.py @ 321:8c569fbe60e4
Load yacc and burg dynamic
author | Windel Bouwman |
---|---|
date | Sun, 19 Jan 2014 18:48:45 +0100 |
parents | 084cccaa5deb |
children | 44f336460c2a |
comparison
equal
deleted
inserted
replaced
320:84d67cce67b7 | 321:8c569fbe60e4 |
---|---|
7 import ppci | 7 import ppci |
8 import io | 8 import io |
9 import target | 9 import target |
10 | 10 |
11 | 11 |
12 # Store testdir for safe switch back to directory: | |
13 testdir = os.path.dirname(os.path.abspath(__file__)) | |
14 | |
15 | |
12 class ZccTestCase(unittest.TestCase): | 16 class ZccTestCase(unittest.TestCase): |
13 """ Tests the compiler driver """ | 17 """ Tests the compiler driver """ |
14 def setUp(self): | 18 def setUp(self): |
15 os.chdir(os.path.dirname(os.path.abspath(__file__))) | 19 os.chdir(testdir) |
20 | |
21 def tearDown(self): | |
22 os.chdir(testdir) | |
16 | 23 |
17 def do(self, filenames, imps=[]): | 24 def do(self, filenames, imps=[]): |
18 basedir = os.path.join('..', 'examples', 'c3') | 25 basedir = os.path.join('..', 'examples', 'c3') |
19 arg_list = [os.path.join(basedir, fn) for fn in filenames] | 26 arg_list = [os.path.join(basedir, fn) for fn in filenames] |
20 for fn in imps: | 27 for fn in imps: |