blob: 1db09282b3021c9fb99aa0a597836b217cf919d4 [file] [log] [blame]
showard3de2a762008-09-12 16:33:18 +00001#!/usr/bin/python
2
showardb7ad0962009-06-15 20:22:23 +00003import os, shutil, tempfile, unittest
showard3de2a762008-09-12 16:33:18 +00004
5COMPILE_SCRIPT_DIR = os.path.join(os.path.dirname(__file__), 'client')
6
7class ClientCompilationTest(unittest.TestCase):
8 def _compile_module(self, module_name):
9 compile_script = module_name + '-compile'
10 full_path = os.path.join(COMPILE_SCRIPT_DIR, compile_script)
showardb7ad0962009-06-15 20:22:23 +000011 temp_dir = tempfile.mkdtemp('.client_compilation_unittest')
12 try:
13 result = os.system(full_path + ' -validateOnly -out ' + temp_dir)
14 finally:
15 shutil.rmtree(temp_dir)
showard3de2a762008-09-12 16:33:18 +000016 self.assertEquals(result, 0)
17
18
19 def test_afe_compilation(self):
20 self._compile_module('AfeClient')
21
22
23 def test_tko_compilation(self):
24 self._compile_module('TkoClient')
25
26
showard9f4500a2009-04-27 20:10:35 +000027 def test_embedded_tko_compilation(self):
28 self._compile_module('EmbeddedTkoClient')
29
30
showard3de2a762008-09-12 16:33:18 +000031if __name__ == '__main__':
32 unittest.main()