showard | 3de2a76 | 2008-09-12 16:33:18 +0000 | [diff] [blame] | 1 | #!/usr/bin/python |
2 | |||||
showard | b7ad096 | 2009-06-15 20:22:23 +0000 | [diff] [blame] | 3 | import os, shutil, tempfile, unittest |
jamesren | dcfa658 | 2010-02-19 21:56:00 +0000 | [diff] [blame] | 4 | import common |
showard | 3de2a76 | 2008-09-12 16:33:18 +0000 | [diff] [blame] | 5 | |
jamesren | dcfa658 | 2010-02-19 21:56:00 +0000 | [diff] [blame] | 6 | _AUTOTEST_DIR = common.autotest_dir |
7 | |||||
showard | 3de2a76 | 2008-09-12 16:33:18 +0000 | [diff] [blame] | 8 | |
9 | class ClientCompilationTest(unittest.TestCase): | ||||
jamesren | dcfa658 | 2010-02-19 21:56:00 +0000 | [diff] [blame] | 10 | |
11 | |||||
showard | 3de2a76 | 2008-09-12 16:33:18 +0000 | [diff] [blame] | 12 | def _compile_module(self, module_name): |
jamesren | dcfa658 | 2010-02-19 21:56:00 +0000 | [diff] [blame] | 13 | compile_script = os.path.join(_AUTOTEST_DIR, 'utils', |
14 | 'compile_gwt_clients.py') | ||||
15 | cmd = '%s -d -c %s -e "-validateOnly"' % (compile_script, module_name) | ||||
16 | result = os.system(cmd) | ||||
showard | 3de2a76 | 2008-09-12 16:33:18 +0000 | [diff] [blame] | 17 | self.assertEquals(result, 0) |
18 | |||||
19 | |||||
20 | def test_afe_compilation(self): | ||||
jamesren | dcfa658 | 2010-02-19 21:56:00 +0000 | [diff] [blame] | 21 | self._compile_module('autotest.AfeClient') |
showard | 3de2a76 | 2008-09-12 16:33:18 +0000 | [diff] [blame] | 22 | |
23 | |||||
24 | def test_tko_compilation(self): | ||||
jamesren | dcfa658 | 2010-02-19 21:56:00 +0000 | [diff] [blame] | 25 | self._compile_module('autotest.TkoClient') |
showard | 3de2a76 | 2008-09-12 16:33:18 +0000 | [diff] [blame] | 26 | |
27 | |||||
showard | 9f4500a | 2009-04-27 20:10:35 +0000 | [diff] [blame] | 28 | def test_embedded_tko_compilation(self): |
jamesren | dcfa658 | 2010-02-19 21:56:00 +0000 | [diff] [blame] | 29 | self._compile_module('autotest.EmbeddedTkoClient') |
showard | 9f4500a | 2009-04-27 20:10:35 +0000 | [diff] [blame] | 30 | |
31 | |||||
showard | 3de2a76 | 2008-09-12 16:33:18 +0000 | [diff] [blame] | 32 | if __name__ == '__main__': |
33 | unittest.main() |