You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2012/03/21 10:01:59 UTC

svn commit: r1303316 - /subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py

Author: julianfoad
Date: Wed Mar 21 09:01:59 2012
New Revision: 1303316

URL: http://svn.apache.org/viewvc?rev=1303316&view=rev
Log:
* subversion/tests/cmdline/svntest/sandbox.py
  (Sandbox.get_tempname): Fix a bug: don't remove the directory before
    allocating another filename in it.

Modified:
    subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py

Modified: subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py?rev=1303316&r1=1303315&r2=1303316&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py Wed Mar 21 09:01:59 2012
@@ -151,7 +151,7 @@ class Sandbox:
     """Get a stable name for a temporary file that will be removed after
        running the test"""
 
-    dir = self.add_wc_path('tmp')
+    dir = self.add_wc_path('tmp', remove=False)
     if not os.path.exists(dir):
       os.mkdir(dir)
 



Re: svn commit: r1303316 - /subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py

Posted by Julian Foad <ju...@btopenworld.com>.
Daniel Shahaf wrote:

>>  * subversion/tests/cmdline/svntest/sandbox.py
>>    (Sandbox.get_tempname): Fix a bug: don't remove the directory before
>>      allocating another filename in it.
> 
> This seems to have broken export_tests.py 19 20: they fail if I run them twice
> without removing svn-test-work between the runs.

Thanks.  My fix for one potential bug exposed this other bug in the Sandbox initialization.  Fixed in r1305323.

- Julian

Re: svn commit: r1303316 - /subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py

Posted by Julian Foad <ju...@btopenworld.com>.
Daniel Shahaf wrote:

>>  * subversion/tests/cmdline/svntest/sandbox.py
>>    (Sandbox.get_tempname): Fix a bug: don't remove the directory before
>>      allocating another filename in it.
> 
> This seems to have broken export_tests.py 19 20: they fail if I run them twice
> without removing svn-test-work between the runs.

Thanks.  My fix for one potential bug exposed this other bug in the Sandbox initialization.  Fixed in r1305323.

- Julian

Re: svn commit: r1303316 - /subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py

Posted by Daniel Shahaf <da...@apache.org>.
On Wed, Mar 21, 2012 at 09:01:59AM -0000, julianfoad@apache.org wrote:
> Author: julianfoad
> Date: Wed Mar 21 09:01:59 2012
> New Revision: 1303316
> 
> URL: http://svn.apache.org/viewvc?rev=1303316&view=rev
> Log:
> * subversion/tests/cmdline/svntest/sandbox.py
>   (Sandbox.get_tempname): Fix a bug: don't remove the directory before
>     allocating another filename in it.
> 

This seems to have broken export_tests.py 19 20: they fail if I run them twice
without removing svn-test-work between the runs.

% ../runpytest export 19 20 
2012-03-24 18:03:14 [WARNING] CWD: /home/danielsh/src/svn/t1/subversion/tests/cmdline
Traceback (most recent call last):
  File "/home/danielsh/src/svn/t1/subversion/tests/cmdline/svntest/main.py", line 1332, in run
    rc = self.pred.run(sandbox)
  File "/home/danielsh/src/svn/t1/subversion/tests/cmdline/svntest/testcase.py", line 176, in run
    return self.func(sandbox)
  File "./export_tests.py", line 586, in export_file_to_explicit_cwd
    os.mkdir(tmpdir)
OSError: [Errno 17] File exists: 'svn-test-work/working_copies/export_tests-19.tmp/file-exports-1'
FAIL:  export_tests.py 19: export a single file to '.', via wc
zsh: exit 1     ../runpytest export 19 20

> Modified:
>     subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py
> 
> Modified: subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py?rev=1303316&r1=1303315&r2=1303316&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py (original)
> +++ subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py Wed Mar 21 09:01:59 2012
> @@ -151,7 +151,7 @@ class Sandbox:
>      """Get a stable name for a temporary file that will be removed after
>         running the test"""
>  
> -    dir = self.add_wc_path('tmp')
> +    dir = self.add_wc_path('tmp', remove=False)
>      if not os.path.exists(dir):
>        os.mkdir(dir)
>  
> 
> 

Re: svn commit: r1303316 - /subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py

Posted by Daniel Shahaf <da...@apache.org>.
On Wed, Mar 21, 2012 at 09:01:59AM -0000, julianfoad@apache.org wrote:
> Author: julianfoad
> Date: Wed Mar 21 09:01:59 2012
> New Revision: 1303316
> 
> URL: http://svn.apache.org/viewvc?rev=1303316&view=rev
> Log:
> * subversion/tests/cmdline/svntest/sandbox.py
>   (Sandbox.get_tempname): Fix a bug: don't remove the directory before
>     allocating another filename in it.
> 

This seems to have broken export_tests.py 19 20: they fail if I run them twice
without removing svn-test-work between the runs.

% ../runpytest export 19 20 
2012-03-24 18:03:14 [WARNING] CWD: /home/danielsh/src/svn/t1/subversion/tests/cmdline
Traceback (most recent call last):
  File "/home/danielsh/src/svn/t1/subversion/tests/cmdline/svntest/main.py", line 1332, in run
    rc = self.pred.run(sandbox)
  File "/home/danielsh/src/svn/t1/subversion/tests/cmdline/svntest/testcase.py", line 176, in run
    return self.func(sandbox)
  File "./export_tests.py", line 586, in export_file_to_explicit_cwd
    os.mkdir(tmpdir)
OSError: [Errno 17] File exists: 'svn-test-work/working_copies/export_tests-19.tmp/file-exports-1'
FAIL:  export_tests.py 19: export a single file to '.', via wc
zsh: exit 1     ../runpytest export 19 20

> Modified:
>     subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py
> 
> Modified: subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py?rev=1303316&r1=1303315&r2=1303316&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py (original)
> +++ subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py Wed Mar 21 09:01:59 2012
> @@ -151,7 +151,7 @@ class Sandbox:
>      """Get a stable name for a temporary file that will be removed after
>         running the test"""
>  
> -    dir = self.add_wc_path('tmp')
> +    dir = self.add_wc_path('tmp', remove=False)
>      if not os.path.exists(dir):
>        os.mkdir(dir)
>  
> 
>