blob: bbb0f8fd26311d7abab35c4e78b72d0e90a0340c [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
jamesrendcfa6582010-02-19 21:56:00 +00004import common
showard3de2a762008-09-12 16:33:18 +00005
jamesrendcfa6582010-02-19 21:56:00 +00006_AUTOTEST_DIR = common.autotest_dir
7
showard3de2a762008-09-12 16:33:18 +00008
9class ClientCompilationTest(unittest.TestCase):
jamesrendcfa6582010-02-19 21:56:00 +000010
11
showard3de2a762008-09-12 16:33:18 +000012 def _compile_module(self, module_name):
jamesrendcfa6582010-02-19 21:56:00 +000013 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)
showard3de2a762008-09-12 16:33:18 +000017 self.assertEquals(result, 0)
18
19
20 def test_afe_compilation(self):
jamesrendcfa6582010-02-19 21:56:00 +000021 self._compile_module('autotest.AfeClient')
showard3de2a762008-09-12 16:33:18 +000022
23
24 def test_tko_compilation(self):
jamesrendcfa6582010-02-19 21:56:00 +000025 self._compile_module('autotest.TkoClient')
showard3de2a762008-09-12 16:33:18 +000026
27
showard9f4500a2009-04-27 20:10:35 +000028 def test_embedded_tko_compilation(self):
jamesrendcfa6582010-02-19 21:56:00 +000029 self._compile_module('autotest.EmbeddedTkoClient')
showard9f4500a2009-04-27 20:10:35 +000030
31
showard3de2a762008-09-12 16:33:18 +000032if __name__ == '__main__':
33 unittest.main()