Don't mess with the www directory when running GWT code verification.
Signed-off-by: Steve Howard <showard@google.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@3264 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/frontend/client_compilation_unittest.py b/frontend/client_compilation_unittest.py
index 61af2f8..1db0928 100644
--- a/frontend/client_compilation_unittest.py
+++ b/frontend/client_compilation_unittest.py
@@ -1,6 +1,6 @@
#!/usr/bin/python
-import unittest, os
+import os, shutil, tempfile, unittest
COMPILE_SCRIPT_DIR = os.path.join(os.path.dirname(__file__), 'client')
@@ -8,7 +8,11 @@
def _compile_module(self, module_name):
compile_script = module_name + '-compile'
full_path = os.path.join(COMPILE_SCRIPT_DIR, compile_script)
- result = os.system(full_path + ' -validateOnly')
+ temp_dir = tempfile.mkdtemp('.client_compilation_unittest')
+ try:
+ result = os.system(full_path + ' -validateOnly -out ' + temp_dir)
+ finally:
+ shutil.rmtree(temp_dir)
self.assertEquals(result, 0)