@@ -782,6 +782,16 @@ test_submodule_forced_switch () {
782782
783783test_submodule_switch_recursing () {
784784 command=" $1 "
785+ RESULTDS=success
786+ if test " $KNOWN_FAILURE_DIRECTORY_SUBMODULE_CONFLICTS " = 1
787+ then
788+ RESULTDS=failure
789+ fi
790+ RESULTR=success
791+ if test " $KNOWN_FAILURE_SUBMODULE_RECURSIVE_NESTED " = 1
792+ then
793+ RESULTR=failure
794+ fi
785795 # ######################## Appearing submodule #########################
786796 # Switching to a commit letting a submodule appear checks it out ...
787797 test_expect_success " $command : added submodule is checked out" '
@@ -891,7 +901,7 @@ test_submodule_switch_recursing () {
891901 '
892902 # Replacing a submodule with files in a directory must succeeds
893903 # when the submodule is clean
894- test_expect_success " $command : replace submodule with a directory" '
904+ test_expect_ $RESULTDS " $command : replace submodule with a directory" '
895905 prolog &&
896906 reset_work_tree_to_interested add_sub1 &&
897907 (
@@ -903,7 +913,7 @@ test_submodule_switch_recursing () {
903913 )
904914 '
905915 # ... absorbing a .git directory.
906- test_expect_success " $command : replace submodule containing a .git directory with a directory must absorb the git dir" '
916+ test_expect_ $RESULTDS " $command : replace submodule containing a .git directory with a directory must absorb the git dir" '
907917 prolog &&
908918 reset_work_tree_to_interested add_sub1 &&
909919 (
@@ -931,7 +941,7 @@ test_submodule_switch_recursing () {
931941 '
932942
933943 # ... must check its local work tree for untracked files
934- test_expect_success " $command : replace submodule with a file must fail with untracked files" '
944+ test_expect_ $RESULTDS " $command : replace submodule with a file must fail with untracked files" '
935945 prolog &&
936946 reset_work_tree_to_interested add_sub1 &&
937947 (
@@ -987,7 +997,8 @@ test_submodule_switch_recursing () {
987997 )
988998 '
989999
990- test_expect_success " $command : modified submodule updates submodule recursively" '
1000+ # recursing deeper than one level doesn't work yet.
1001+ test_expect_$RESULTR " $command : modified submodule updates submodule recursively" '
9911002 prolog &&
9921003 reset_work_tree_to_interested add_nested_sub &&
9931004 (
@@ -1006,6 +1017,11 @@ test_submodule_switch_recursing () {
10061017# the superproject as well as the submodule is allowed.
10071018test_submodule_forced_switch_recursing () {
10081019 command=" $1 "
1020+ RESULT=success
1021+ if test " $KNOWN_FAILURE_DIRECTORY_SUBMODULE_CONFLICTS " = 1
1022+ then
1023+ RESULT=failure
1024+ fi
10091025 # ######################## Appearing submodule #########################
10101026 # Switching to a commit letting a submodule appear creates empty dir ...
10111027 test_expect_success " $command : added submodule is checked out" '
@@ -1151,7 +1167,7 @@ test_submodule_forced_switch_recursing () {
11511167 '
11521168
11531169 # ... but stops for untracked files that would be lost
1154- test_expect_success " $command : replace submodule with a file" '
1170+ test_expect_ $RESULT " $command : replace submodule with a file stops for untracked files " '
11551171 prolog &&
11561172 reset_work_tree_to_interested add_sub1 &&
11571173 (
0 commit comments