2010-10-04 Dirk Pranke <dpranke@chromium.org>
authordpranke@chromium.org <dpranke@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Oct 2010 06:39:23 +0000 (06:39 +0000)
committerdpranke@chromium.org <dpranke@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Oct 2010 06:39:23 +0000 (06:39 +0000)
        Unreviewed, build fix.

        r69065 broke test-webkitpy by trying to create a '/tmp-X' directory,
        which can't always be done. This test uses tempfile.mkdtemp(), which
        should be safe.

        * Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69085 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKitTools/ChangeLog
WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py

index f8a5975c0ab14fd11029c9258c491adb402fb67b..308f2233eca9410494179b2755312528c31c5b0e 100644 (file)
@@ -1,3 +1,13 @@
+2010-10-04  Dirk Pranke  <dpranke@chromium.org>
+
+        Unreviewed, build fix.
+
+        r69065 broke test-webkitpy by trying to create a '/tmp-X' directory,
+        which can't always be done. This test uses tempfile.mkdtemp(), which
+        should be safe.
+
+        * Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py:
+
 2010-10-04  Dirk Pranke  <dpranke@chromium.org>
 
         Unreviewed, build fix.
index 8bb90e84d5d5d56d131ef32dd81c416f1a34c630..11b77dbe4742fe6f9313f112c9075caf1eaf70fc 100644 (file)
@@ -34,6 +34,7 @@ import codecs
 import logging
 import os
 import Queue
+import shutil
 import sys
 import tempfile
 import thread
@@ -237,9 +238,11 @@ class MainTest(unittest.TestCase):
         # We run a configuration that should fail, to generate output, then
         # look for what the output results url was.
 
-        res, out, err, user = logging_run(['--results-directory=/tmp-results'],
+        tmpdir = tempfile.mkdtemp()
+        res, out, err, user = logging_run(['--results-directory=' + tmpdir],
                                           tests_included=True)
-        self.assertEqual(user.url, '/tmp-results/results.html')
+        self.assertEqual(user.url, os.path.join(tmpdir, 'results.html'))
+        shutil.rmtree(tmpdir, ignore_errors=True)
 
     def test_results_directory_default(self):
         # We run a configuration that should fail, to generate output, then