Update frontend/client_compliation_unittest.py to use new GWT compilation
tool.

Signed-off-by: James Ren <[email protected]>
Index: autotest/frontend/client_compilation_unittest.py
===================================================================
--- autotest/frontend/client_compilation_unittest.py	(revision 4248)
+++ autotest/frontend/client_compilation_unittest.py	(working copy)
@@ -1,31 +1,32 @@
 #!/usr/bin/python
 
 import os, shutil, tempfile, unittest
+import common
 
-COMPILE_SCRIPT_DIR = os.path.join(os.path.dirname(__file__), 'client')
+_AUTOTEST_DIR = common.autotest_dir
 
+
 class ClientCompilationTest(unittest.TestCase):
+
+
     def _compile_module(self, module_name):
-        compile_script = module_name + '-compile'
-        full_path = os.path.join(COMPILE_SCRIPT_DIR, compile_script)
-        temp_dir = tempfile.mkdtemp('.client_compilation_unittest')
-        try:
-            result = os.system(full_path + ' -validateOnly -war ' + temp_dir)
-        finally:
-            shutil.rmtree(temp_dir)
+        compile_script = os.path.join(_AUTOTEST_DIR, 'utils',
+                                       'compile_gwt_clients.py')
+        cmd = '%s -d -c %s -e "-validateOnly"' % (compile_script, module_name)
+        result = os.system(cmd)
         self.assertEquals(result, 0)
 
 
     def test_afe_compilation(self):
-        self._compile_module('AfeClient')
+        self._compile_module('autotest.AfeClient')
 
 
     def test_tko_compilation(self):
-        self._compile_module('TkoClient')
+        self._compile_module('autotest.TkoClient')
 
 
     def test_embedded_tko_compilation(self):
-        self._compile_module('EmbeddedTkoClient')
+        self._compile_module('autotest.EmbeddedTkoClient')
 
 
 if __name__ == '__main__':
_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to