Mercurial > lcfOS
diff test/testzcc.py @ 346:3bb7dcfe5529
expanded arm target
author | Windel Bouwman |
---|---|
date | Fri, 07 Mar 2014 17:05:32 +0100 |
parents | 86b02c98a717 |
children | 899ae3aea803 |
line wrap: on
line diff
--- a/test/testzcc.py Sun Mar 02 17:12:08 2014 +0100 +++ b/test/testzcc.py Fri Mar 07 17:05:32 2014 +0100 @@ -11,6 +11,8 @@ # Store testdir for safe switch back to directory: testdir = os.path.dirname(os.path.abspath(__file__)) +def relpath(*args): + return os.path.join(testdir, *args) class ZccBaseTestCase(unittest.TestCase): def callZcc(self, arg_list): @@ -46,7 +48,7 @@ def testDumpIr(self): - basedir = os.path.join('..', 'examples', 'c3', 'comments.c3') + basedir = relpath('..', 'examples', 'c3', 'comments.c3') arg_list = ['compile', basedir] arg_list.append('--target') arg_list.append('thumb') @@ -54,14 +56,14 @@ def testKernel(self): """ Build kernel using zcc: """ - recipe = os.path.join(testdir, '..', 'kernel', 'recipe.yaml') + recipe = relpath('..', 'kernel', 'recipe.yaml') self.buildRecipe(recipe) @unittest.skip('Too difficult to fix') def testKernelBuildsEqualTwice(self): """ Build kernel two times and check the output is equal """ - recipe = os.path.join(testdir, '..', 'kernel', 'recipe.yaml') - bin_filename = os.path.join(testdir, '..', 'kernel', 'kernel.bin') + recipe = relpath('..', 'kernel', 'recipe.yaml') + bin_filename = relpath('..', 'kernel', 'kernel.bin') self.buildRecipe(recipe) with open(bin_filename, 'rb') as f: a = f.read() @@ -72,14 +74,18 @@ def testUser(self): """ Build userspace using zcc: """ - recipe = os.path.join(testdir, '..', 'user', 'recipe.yaml') + recipe = relpath('..', 'user', 'recipe.yaml') self.buildRecipe(recipe) def testBurn2(self): self.do(['burn2.c3'], ['stm32f4xx.c3']) def testBurn2_recipe(self): - recipe = os.path.join(testdir, '..', 'examples', 'c3', 'recipe.yaml') + recipe = relpath('..', 'examples', 'c3', 'recipe.yaml') + self.buildRecipe(recipe) + + def test_hello_A9_c3_recipe(self): + recipe = relpath('..', 'examples', 'qemu_a9_hello', 'recipe.yaml') self.buildRecipe(recipe) @unittest.skip('Skip because of logfile')