[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

notification backward compatibilty of the testsuite

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Mon, 04 Apr 2011 16:37:22 +0100

I've been working on a revert implementation that fixes some correctness
problems. A side effect of this change is that the notifications
change. In 1.6 revert only notifies for the root of an added tree, my
new code notifies for all the added nodes. This causes 3 of the
regression tests to fail. The 1.6 behaviour seems a bit arbitrary to
me, and reproducing it with my new code would be difficult.

Do we need any sort of backward compatibility in the testsuite? Is it
acceptable to simply change the regression tests to expect the new
notifications? Something like this:

Index: subversion/tests/cmdline/revert_tests.py
===================================================================
--- subversion/tests/cmdline/revert_tests.py (revision 1088611)
+++ subversion/tests/cmdline/revert_tests.py (working copy)
@@ -856,7 +856,8 @@
                                        dry_run = 0)
 
   # now test if the revert works ok
- revert_paths = [G_path]
+ revert_paths = [G_path] + [os.path.join(G_path, child)
+ for child in ['alpha', 'beta', 'pi', 'rho', 'tau']]
 
   expected_output = svntest.verify.UnorderedOutput([
     "Reverted '%s'\n" % path for path in revert_paths])
Index: subversion/tests/cmdline/schedule_tests.py
===================================================================
--- subversion/tests/cmdline/schedule_tests.py (revision 1088611)
+++ subversion/tests/cmdline/schedule_tests.py (working copy)
@@ -312,7 +312,13 @@
   X_path = sbox.ospath('X')
   Y_path = sbox.ospath('A/C/Y')
   Z_path = sbox.ospath('A/D/H/Z')
- files = [X_path, Y_path, Z_path]
+ files = ([X_path, Y_path, Z_path]
+ + [os.path.join(X_path, child)
+ for child in ['P', 'delta']]
+ + [os.path.join(Y_path, child)
+ for child in ['Q', 'epsilon', 'upsilon']]
+ + [os.path.join(Z_path, child)
+ for child in ['R', 'zeta']])
 
   exit_code, output, err = svntest.actions.run_and_verify_svn(None, None, [],
                                                               'revert',
Index: subversion/tests/cmdline/depth_tests.py
===================================================================
--- subversion/tests/cmdline/depth_tests.py (revision 1088611)
+++ subversion/tests/cmdline/depth_tests.py (working copy)
@@ -2221,7 +2221,11 @@
   #verify_depth(None, "empty", LE_path)
 
   # revert A/L, with an excluded item in the tree
- expected_output = ["Reverted '"+L_path+"'\n"]
+ revert_paths = [L_path] + [os.path.join(L_path, child)
+ for child in ['E', 'F', 'lambda']]
+ expected_output = svntest.verify.UnorderedOutput([
+ "Reverted '%s'\n" % path for path in revert_paths])
+
   svntest.actions.run_and_verify_svn(None, expected_output, [],
                                      'revert', '--depth=infinity', L_path)
 

-- 
Philip
Received on 2011-04-04 17:37:58 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.