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

Re: tree-conflicts: patch for improved cmdline tests

From: Neels Janosch Hofmeyr <neels_at_elego.de>
Date: Tue, 19 Aug 2008 01:34:39 +0200

Sorry, a debugging line had crept into that patch!
Reposting.

(The line was "return None" in actions.py to investigate a segfault)

(same commit message)
[[[
Replacing file-based tree-conflicts cmdline tests. The new tests are
concerned with directory *and* file victims, in different tree depths.
Contains new tests for update, switch and merge operations.

* subversion/tests/cmdline/svntest/actions.py
  (set_up_tree_conflicts): Remove old helper for update, switch.
  (set_up_tree_conflicts_for_merge): Remove old helper for merge.
  (make_tc_test_trees): Rename and split new helper into make_deep_trees()
    and add_deep_trees().
  (tc_leaf_del): Rename new helper to deep_trees_leaf_del().
  (tc_tree_del): Rename new helper to deep_trees_tree_del().
  (tc_tree_del): Rename new helper to deep_trees_tree_del().
  (tc_text_append): Rename new helper to deep_trees_leaf_edit().
  (set_up_deep_tree_conflicts_up): Remove function, its purpose replaced by
    deep_trees_run_tests_scheme_for_update().
  (set_up_deep_tree_conflicts_sw): Remove function, its purpose replaced by
    deep_trees_run_tests_scheme_for_switch().
  (add_deep_trees): New function, replacing make_tc_test_trees().
  (make_deep_trees): New function, used by add_deep_trees().
  (deep_trees_virginal_state): New wc.State structure.
  (deep_trees_leaf_edit): New function.
  (deep_trees_after_leaf_edit): New wc.State structure.
  (deep_trees_leaf_del): New function.
  (deep_trees_after_leaf_del): New wc.State structure.
  (deep_trees_tree_del): New function.
  (deep_trees_after_tree_del): New wc.State structure.
  (DeepTreesTestCase): New class.
  (deep_trees_run_tests_scheme_for_update): New function.
  (deep_trees_run_tests_scheme_for_switch): New function.
  (deep_trees_run_tests_scheme_for_merge): New function.

* subversion/tests/cmdline/update_tests.py
  (tree_conflicts_in_updated_files): Remove old test, replaced by
    tree_conflicts_on_update().
  (tree_conflicts_on_update): New test, replacing
    tree_conflicts_in_updated_files(). Adds directory victims, and
    conflicts in different tree depths.

* subversion/tests/cmdline/switch_tests.py
  (tree_conflicts_in_switched_files): Remove old test, replaced by
    tree_conflicts_on_switch().
  (tree_conflicts_on_switch): New test, replacing
    tree_conflicts_in_switched_files(). Adds directory victims, and
    conflicts in different tree depths.

* subversion/tests/cmdline/merge_tests.py
  (tree_conflicts_in_merged_files): Remove old test, replaced by
    tree_conflicts_on_merge().
  (tree_conflicts_on_merge): New test, replacing
    tree_conflicts_in_merged_files(). Adds directory victims, and conflicts
    in different tree depths. Adds another case to the old merge test,
    namely omitting a local commit.
]]]

Neels Janosch Hofmeyr wrote:
> Hi!
>
> The current cmdline tests for tree-conflicts (in update_tests.py,
> switch_tests.py and merge_tests.py) only test for file victims.
>
> The new tests in this patch still do exactly what the old tests did (file
> victims), but they also test for directory victims and (more) file victims
> in a large set of tree-conflict cases in varying depths of directory trees.
>
> AFAIK, this new set is complete in that it covers every imaginable case of
> tree conflicts, for all of update, switch and merge.
>
> I started off with sbutler's new (unfinished) test scheme which is already
> committed on the tree-conflicts branch, and took it to a workable state. I
> removed the old file-based tests, after checking for identical results.
>
> Currently, most of these new tests still yield undesirable results. The
> course that I aim for is this:
>
> 1) Commit the new tree-conflicts tests, so that they PASS the current
> tree-conflicts branch, even though many test results are still
> undesirable. (This patch)
>
> 2) One by one, look at the undesirable results and fix them in subsequent
> patches. Patches should both fix the situation and make the tests
> pass the fixed situation.
>
> So, as mentioned, this patch passes the current situation on the
> tree-conflicts branch. But, one test case cannot be passed, because it fails
> in a segmentation fault!
>
> I have investigated this and posted a preliminary patch in another mail:
> http://subversion.tigris.org/servlets/ReadMsg?listName=dev&msgNo=141887
>
> I would like this patch to be committed on the tree-conflicts branch, so
> that continuing work on fixing tree-conflicts situations can be comprehensive.
>
> Thanks!
>
> [[[
> Replacing file-based tree-conflicts cmdline tests. The new tests are
> concerned with directory *and* file victims, in different tree depths.
> Contains new tests for update, switch and merge operations.
>
> * subversion/tests/cmdline/svntest/actions.py
> (set_up_tree_conflicts): Remove old helper for update, switch.
> (set_up_tree_conflicts_for_merge): Remove old helper for merge.
> (make_tc_test_trees): Rename and split new helper into make_deep_trees()
> and add_deep_trees().
> (tc_leaf_del): Rename new helper to deep_trees_leaf_del().
> (tc_tree_del): Rename new helper to deep_trees_tree_del().
> (tc_tree_del): Rename new helper to deep_trees_tree_del().
> (tc_text_append): Rename new helper to deep_trees_leaf_edit().
> (set_up_deep_tree_conflicts_up): Remove function, its purpose replaced by
> deep_trees_run_tests_scheme_for_update().
> (set_up_deep_tree_conflicts_sw): Remove function, its purpose replaced by
> deep_trees_run_tests_scheme_for_switch().
> (add_deep_trees): New function, replacing make_tc_test_trees().
> (make_deep_trees): New function, used by add_deep_trees().
> (deep_trees_virginal_state): New wc.State structure.
> (deep_trees_leaf_edit): New function.
> (deep_trees_after_leaf_edit): New wc.State structure.
> (deep_trees_leaf_del): New function.
> (deep_trees_after_leaf_del): New wc.State structure.
> (deep_trees_tree_del): New function.
> (deep_trees_after_tree_del): New wc.State structure.
> (DeepTreesTestCase): New class.
> (deep_trees_run_tests_scheme_for_update): New function.
> (deep_trees_run_tests_scheme_for_switch): New function.
> (deep_trees_run_tests_scheme_for_merge): New function.
>
> * subversion/tests/cmdline/update_tests.py
> (tree_conflicts_in_updated_files): Remove old test, replaced by
> tree_conflicts_on_update().
> (tree_conflicts_on_update): New test, replacing
> tree_conflicts_in_updated_files(). Adds directory victims, and
> conflicts in different tree depths.
>
> * subversion/tests/cmdline/switch_tests.py
> (tree_conflicts_in_switched_files): Remove old test, replaced by
> tree_conflicts_on_switch().
> (tree_conflicts_on_switch): New test, replacing
> tree_conflicts_in_switched_files(). Adds directory victims, and
> conflicts in different tree depths.
>
> * subversion/tests/cmdline/merge_tests.py
> (tree_conflicts_in_merged_files): Remove old test, replaced by
> tree_conflicts_on_merge().
> (tree_conflicts_on_merge): New test, replacing
> tree_conflicts_in_merged_files(). Adds directory victims, and conflicts
> in different tree depths. Adds another case to the old merge test,
> namely omitting a local commit.
> ]]]
>
>
>

-- 
Neels Hofmeyr -- elego Software Solutions GmbH
Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
phone: +49 30 23458696  mobile: +49 177 2345869  fax: +49 30 23458695
http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
Handelsreg: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194

Received on 2008-08-19 01:40:03 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.