Skip to content

Commit

Permalink
Replace Ubuntu 18.04 with 22.04 in github actions
Browse files Browse the repository at this point in the history
Modify tests to work with svn 1.14
Skip tests which are broken with svn 1.13.0 (Ubuntu 20.04)
Use Python 3 (not 2) in tests
  • Loading branch information
dpmatthews committed Dec 11, 2023
1 parent 331a53b commit c69b6bf
Show file tree
Hide file tree
Showing 17 changed files with 293 additions and 196 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ jobs:
strategy:
fail-fast: False
matrix:
ubuntu: ['ubuntu-18.04', 'ubuntu-20.04']
ubuntu: ['ubuntu-20.04', 'ubuntu-22.04']
name: FCM Tests ${{matrix.ubuntu}}
runs-on: ${{matrix.ubuntu}}
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -23,9 +23,11 @@ jobs:
libxml-parser-perl \
libdbi-perl \
libdbd-sqlite3-perl \
python-subversion libsvn-perl \
s-nail
[[ ${{matrix.ubuntu}} == "ubuntu-18.04" ]] && sudo pip install 'trac' || true
libsvn-perl \
s-nail \
subversion
[[ ${{matrix.ubuntu}} != "ubuntu-22.04" ]] && sudo apt install -y python-subversion || true
[[ ${{matrix.ubuntu}} == "ubuntu-22.04" ]] && sudo apt install -y python2 || true
echo "#!/bin/bash" >"${PWD}/bin/gfortran"
echo 'exec gfortran-9 "$@"' >>"${PWD}/bin/gfortran"
chmod +x "${PWD}/bin/gfortran"
Expand Down
100 changes: 50 additions & 50 deletions t/fcm-branch-diff/00-simple.t

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions t/fcm-conflicts/00-tree-add-add.t
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
. $(dirname $0)/test_header
#-------------------------------------------------------------------------------
check_svn_version
[[ $SVN_VERSION == "1.13.0" ]] && skip_all "Tests do not work with svn 1.13.0"
tests 24
#-------------------------------------------------------------------------------
setup
Expand Down Expand Up @@ -56,7 +57,7 @@ Answer (y) to keep the local file filename.
Answer (n) to keep the external file filename.
Keep the local version?
#IF SVN1.8/9 Enter "y" or "n" (or just press <return> for "n") Resolved conflicted state of 'new_file'
#IF SVN1.10 Enter "y" or "n" (or just press <return> for "n") Tree conflict at 'new_file' marked as resolved.
#IF SVN1.10/14 Enter "y" or "n" (or just press <return> for "n") Tree conflict at 'new_file' marked as resolved.
__OUT__
file_cmp "$TEST_KEY.err" "$TEST_KEY.err" </dev/null
#-------------------------------------------------------------------------------
Expand Down Expand Up @@ -116,7 +117,7 @@ Answer (y) to keep the local file filename.
Answer (n) to keep the external file filename.
Keep the local version?
#IF SVN1.8/9 Enter "y" or "n" (or just press <return> for "n") Resolved conflicted state of 'new_file'
#IF SVN1.10 Enter "y" or "n" (or just press <return> for "n") Tree conflict at 'new_file' marked as resolved.
#IF SVN1.10/14 Enter "y" or "n" (or just press <return> for "n") Tree conflict at 'new_file' marked as resolved.
__OUT__
file_cmp "$TEST_KEY.err" "$TEST_KEY.err" </dev/null
#-------------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions t/fcm-conflicts/01-tree-delete-delete.t
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Answer (y) to accept the local delete.
Answer (n) to accept the external delete.
Keep the local version?
#IF SVN1.8/9 Enter "y" or "n" (or just press <return> for "n") Resolved conflicted state of 'pro/hello.pro'
#IF SVN1.10 Enter "y" or "n" (or just press <return> for "n") Tree conflict at 'pro/hello.pro' marked as resolved.
#IF SVN1.10/14 Enter "y" or "n" (or just press <return> for "n") Tree conflict at 'pro/hello.pro' marked as resolved.
__OUT__
file_cmp "$TEST_KEY.err" "$TEST_KEY.err" </dev/null
#-------------------------------------------------------------------------------
Expand Down Expand Up @@ -85,7 +85,7 @@ Answer (y) to accept the local delete.
Answer (n) to accept the external delete.
Keep the local version?
#IF SVN1.8/9 Enter "y" or "n" (or just press <return> for "n") Resolved conflicted state of 'pro/hello.pro'
#IF SVN1.10 Enter "y" or "n" (or just press <return> for "n") Tree conflict at 'pro/hello.pro' marked as resolved.
#IF SVN1.10/14 Enter "y" or "n" (or just press <return> for "n") Tree conflict at 'pro/hello.pro' marked as resolved.
__OUT__
file_cmp "$TEST_KEY.err" "$TEST_KEY.err" </dev/null
#-------------------------------------------------------------------------------
Expand Down
5 changes: 3 additions & 2 deletions t/fcm-conflicts/02-tree-delete-edit.t
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
. $(dirname $0)/test_header
#-------------------------------------------------------------------------------
check_svn_version
[[ $SVN_VERSION == "1.13.0" ]] && skip_all "Tests do not work with svn 1.13.0"
tests 18
#-------------------------------------------------------------------------------
setup
Expand Down Expand Up @@ -57,7 +58,7 @@ Answer (n) to keep the file.
Keep the local version?
Enter "y" or "n" (or just press <return> for "n") A pro/hello.pro
#IF SVN1.8/9 Resolved conflicted state of 'pro/hello.pro'
#IF SVN1.10 Tree conflict at 'pro/hello.pro' marked as resolved.
#IF SVN1.10/14 Tree conflict at 'pro/hello.pro' marked as resolved.
__OUT__
file_cmp "$TEST_KEY.err" "$TEST_KEY.err" </dev/null
#-------------------------------------------------------------------------------
Expand Down Expand Up @@ -120,7 +121,7 @@ Answer (y) to accept the local delete.
Answer (n) to keep the file.
Keep the local version?
#IF SVN1.8/9 Enter "y" or "n" (or just press <return> for "n") Resolved conflicted state of 'pro/hello.pro'
#IF SVN1.10 Enter "y" or "n" (or just press <return> for "n") Tree conflict at 'pro/hello.pro' marked as resolved.
#IF SVN1.10/14 Enter "y" or "n" (or just press <return> for "n") Tree conflict at 'pro/hello.pro' marked as resolved.
__OUT__
file_cmp "$TEST_KEY.err" "$TEST_KEY.err" </dev/null
#-------------------------------------------------------------------------------
Expand Down
5 changes: 3 additions & 2 deletions t/fcm-conflicts/03-tree-delete-rename.t
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
. $(dirname $0)/test_header
#-------------------------------------------------------------------------------
check_svn_version
[[ $SVN_VERSION == "1.13.0" ]] && skip_all "Tests do not work with svn 1.13.0"
tests 15
#-------------------------------------------------------------------------------
setup
Expand Down Expand Up @@ -56,7 +57,7 @@ Answer (y) to accept the local delete.
Answer (n) to accept the external rename.
Keep the local version?
#IF SVN1.8/9 Enter "y" or "n" (or just press <return> for "n") Resolved conflicted state of 'pro/hello.pro'
#IF SVN1.10 Enter "y" or "n" (or just press <return> for "n") Tree conflict at 'pro/hello.pro' marked as resolved.
#IF SVN1.10/14 Enter "y" or "n" (or just press <return> for "n") Tree conflict at 'pro/hello.pro' marked as resolved.
__OUT__
file_cmp "$TEST_KEY.err" "$TEST_KEY.err" </dev/null
#-------------------------------------------------------------------------------
Expand Down Expand Up @@ -100,7 +101,7 @@ Answer (n) to accept the external rename.
Keep the local version?
Enter "y" or "n" (or just press <return> for "n") Reverted 'pro/hello.pro.renamed'
#IF SVN1.8/9 Resolved conflicted state of 'pro/hello.pro'
#IF SVN1.10 Tree conflict at 'pro/hello.pro' marked as resolved.
#IF SVN1.10/14 Tree conflict at 'pro/hello.pro' marked as resolved.
__OUT__
file_cmp "$TEST_KEY.err" "$TEST_KEY.err" </dev/null
#-------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion t/fcm-conflicts/04-tree-edit-delete.t
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Answer (y) to keep the file.
Answer (n) to accept the external delete.
Keep the local version?
#IF SVN1.8/9 Enter "y" or "n" (or just press <return> for "n") Resolved conflicted state of 'pro/hello.pro'
#IF SVN1.10 Enter "y" or "n" (or just press <return> for "n") Tree conflict at 'pro/hello.pro' marked as resolved.
#IF SVN1.10/14 Enter "y" or "n" (or just press <return> for "n") Tree conflict at 'pro/hello.pro' marked as resolved.
__OUT__
file_cmp "$TEST_KEY.err" "$TEST_KEY.err" </dev/null
#-------------------------------------------------------------------------------
Expand Down
100 changes: 70 additions & 30 deletions t/fcm-conflicts/05-tree-edit-rename.t
Original file line number Diff line number Diff line change
Expand Up @@ -48,67 +48,87 @@ svn commit -q -m "Modified the merge copy of renamed conflict file"
svn update -q
svn switch -q $ROOT_URL/branches/dev/Share/ctrl
fcm merge --non-interactive $ROOT_URL/branches/dev/Share/ed_ren >/dev/null
run_pass "$TEST_KEY" fcm conflicts <<__IN__
if [[ $SVN_MINOR_VERSION == "1.14" ]]; then
run_pass "$TEST_KEY" fcm conflicts <<__IN__
y
__IN__
else
run_pass "$TEST_KEY" fcm conflicts <<__IN__
n
__IN__
file_cmp "$TEST_KEY.out" "$TEST_KEY.out" <<__OUT__
[info] pro/hello.pro: in tree conflict.
Locally: edited.
Externally: renamed to pro/hello.pro.renamed.
Answer (y) to keep the file.
Answer (n) to accept the external rename.
You can then merge in changes.
Keep the local version?
Enter "y" or "n" (or just press <return> for "n") diff3 pro/hello.pro.renamed.working pro/hello.pro.renamed.merge-left.r1 pro/hello.pro.renamed.merge-right.r8
fi
file_cmp_filtered "$TEST_KEY.out" "$TEST_KEY.out" <<__OUT__
#IF SVN1.8/9/10 [info] pro/hello.pro: in tree conflict.
#IF SVN1.14 [info] pro/hello.pro.renamed: in text conflict.
#IF SVN1.8/9/10 Locally: edited.
#IF SVN1.8/9/10 Externally: renamed to pro/hello.pro.renamed.
#IF SVN1.8/9/10 Answer (y) to keep the file.
#IF SVN1.8/9/10 Answer (n) to accept the external rename.
#IF SVN1.8/9/10 You can then merge in changes.
#IF SVN1.8/9/10 Keep the local version?
#IF SVN1.8/9/10 Enter "y" or "n" (or just press <return> for "n") diff3 pro/hello.pro.renamed.working pro/hello.pro.renamed.merge-left.r1 pro/hello.pro.renamed.merge-right.r8
#IF SVN1.14 diff3 $PWD/pro/hello.pro.renamed.3.tmp $PWD/pro/hello.pro.renamed.tmp $PWD/pro/hello.pro.renamed.2.tmp
====
1:3c
Local contents (1)
2:2a
3:3,4c
Merge contents (1)
Merge contents (2)
D pro/hello.pro
#IF SVN1.8/9/10 D pro/hello.pro
#IF SVN1.14 Run "svn resolve --accept working pro/hello.pro.renamed"?
#IF SVN1.14 Enter "y" or "n" (or just press <return> for "n") Merge conflicts in 'pro/hello.pro.renamed' marked as resolved.
__OUT__
file_cmp "$TEST_KEY.err" "$TEST_KEY.err" </dev/null
#-------------------------------------------------------------------------------
# Tests fcm conflicts: edit, rename, discard local (status)
TEST_KEY=$TEST_KEY_BASE-discard-status
run_pass "$TEST_KEY" svn status --config-dir=$TEST_DIR/.subversion/
file_cmp "$TEST_KEY.out" "$TEST_KEY.out" <<__OUT__
file_cmp_filtered "$TEST_KEY.out" "$TEST_KEY.out" <<__OUT__
M .
D pro/hello.pro
#IF SVN1.14 > moved to pro/hello.pro.renamed
A + pro/hello.pro.renamed
#IF SVN1.14 > moved from pro/hello.pro
__OUT__
file_cmp "$TEST_KEY.err" "$TEST_KEY.err" </dev/null
#-------------------------------------------------------------------------------
# Tests fcm conflicts: edit, rename, discard local (info)
TEST_KEY=$TEST_KEY_BASE-discard-info
run_pass "$TEST_KEY" svn info pro/hello.pro.renamed
sed -i "/Date:\|Updated:\|UUID:\|Checksum\|Relative URL:\|Working Copy Root Path:/d" $TEST_DIR/"$TEST_KEY.out"
file_cmp "$TEST_KEY.out" "$TEST_KEY.out" <<__OUT__
file_cmp_filtered "$TEST_KEY.out" "$TEST_KEY.out" <<__OUT__
Path: pro/hello.pro.renamed
Name: hello.pro.renamed
URL: $ROOT_URL/branches/dev/Share/ctrl/pro/hello.pro.renamed
Repository Root: $REPOS_URL
Revision: 8
Node Kind: file
Schedule: add
Copied From URL: $ROOT_URL/branches/dev/Share/ed_ren/pro/hello.pro.renamed
#IF SVN1.8/9/10 Copied From URL: $ROOT_URL/branches/dev/Share/ed_ren/pro/hello.pro.renamed
#IF SVN1.14 Copied From URL: $ROOT_URL/branches/dev/Share/ctrl/pro/hello.pro
Copied From Rev: 8
#IF SVN1.14 Moved From: pro/hello.pro
Last Changed Author: $LOGNAME
Last Changed Rev: 8
#IF SVN1.8/9/10 Last Changed Rev: 8
#IF SVN1.14 Last Changed Rev: 6
__OUT__
file_cmp "$TEST_KEY.err" "$TEST_KEY.err" </dev/null
#-------------------------------------------------------------------------------
# Tests fcm conflicts: delete, rename, discard local (cat)
TEST_KEY=$TEST_KEY_BASE-discard-cat
run_pass "$TEST_KEY" cat pro/hello.pro.renamed
file_cmp "$TEST_KEY.out" "$TEST_KEY.out" <<__OUT__
file_cmp_filtered "$TEST_KEY.out" "$TEST_KEY.out" <<__OUT__
PRO HELLO
END
#IF SVN1.14 <<<<<<< .working
#IF SVN1.14 Local contents (1)
#IF SVN1.14 ||||||| .old
#IF SVN1.14 =======
Merge contents (1)
Merge contents (2)
#IF SVN1.14 >>>>>>> .new
__OUT__
file_cmp "$TEST_KEY.err" "$TEST_KEY.err" </dev/null
#-------------------------------------------------------------------------------
Expand All @@ -125,47 +145,57 @@ run_pass "$TEST_KEY" fcm conflicts <<__IN__
y
__IN__
file_cmp_filtered "$TEST_KEY.out" "$TEST_KEY.out" <<__OUT__
[info] pro/hello.pro: in tree conflict.
Locally: edited.
Externally: renamed to pro/hello.pro.renamed.
Answer (y) to keep the file.
Answer (n) to accept the external rename.
You can then merge in changes.
Keep the local version?
Enter "y" or "n" (or just press <return> for "n") diff3 pro/hello.pro.working pro/hello.pro.merge-left.r1 pro/hello.pro.merge-right.r8
#IF SVN1.8/9/10 [info] pro/hello.pro: in tree conflict.
#IF SVN1.14 [info] pro/hello.pro.renamed: in text conflict.
#IF SVN1.8/9/10 Locally: edited.
#IF SVN1.8/9/10 Externally: renamed to pro/hello.pro.renamed.
#IF SVN1.8/9/10 Answer (y) to keep the file.
#IF SVN1.8/9/10 Answer (n) to accept the external rename.
#IF SVN1.8/9/10 You can then merge in changes.
#IF SVN1.8/9/10 Keep the local version?
#IF SVN1.8/9/10 Enter "y" or "n" (or just press <return> for "n") diff3 pro/hello.pro.working pro/hello.pro.merge-left.r1 pro/hello.pro.merge-right.r8
#IF SVN1.14 diff3 $PWD/pro/hello.pro.renamed.3.tmp $PWD/pro/hello.pro.renamed.tmp $PWD/pro/hello.pro.renamed.2.tmp
====
1:3c
Local contents (1)
2:2a
3:3,4c
Merge contents (1)
Merge contents (2)
Reverted 'pro/hello.pro.renamed'
#IF SVN1.8/9/10 Reverted 'pro/hello.pro.renamed'
#IF SVN1.8/9 Resolved conflicted state of 'pro/hello.pro'
#IF SVN1.10 Tree conflict at 'pro/hello.pro' marked as resolved.
#IF SVN1.14 Run "svn resolve --accept working pro/hello.pro.renamed"?
#IF SVN1.14 Enter "y" or "n" (or just press <return> for "n") Merge conflicts in 'pro/hello.pro.renamed' marked as resolved.
__OUT__
file_cmp "$TEST_KEY.err" "$TEST_KEY.err" </dev/null
#-------------------------------------------------------------------------------
# Tests fcm conflicts: edit, rename, keep local (status)
TEST_KEY=$TEST_KEY_BASE-keep-status
run_pass "$TEST_KEY" svn status --config-dir=$TEST_DIR/.subversion/
file_cmp "$TEST_KEY.out" "$TEST_KEY.out" <<__OUT__
file_cmp_filtered "$TEST_KEY.out" "$TEST_KEY.out" <<__OUT__
M .
#IF SVN1.14 D pro/hello.pro
#IF SVN1.14 > moved to pro/hello.pro.renamed
#IF SVN1.14 A + pro/hello.pro.renamed
#IF SVN1.14 > moved from pro/hello.pro
__OUT__
file_cmp "$TEST_KEY.err" "$TEST_KEY.err" </dev/null
#-------------------------------------------------------------------------------
# Tests fcm conflicts: edit, rename, keep local (info)
TEST_KEY=$TEST_KEY_BASE-keep-info
run_pass "$TEST_KEY" svn info pro/hello.pro
sed -i "/Date:\|Updated:\|UUID:\|Checksum\|Relative URL:\|Working Copy Root Path:/d" $TEST_DIR/"$TEST_KEY.out"
file_cmp "$TEST_KEY.out" "$TEST_KEY.out" <<__OUT__
file_cmp_filtered "$TEST_KEY.out" "$TEST_KEY.out" <<__OUT__
Path: pro/hello.pro
Name: hello.pro
URL: $ROOT_URL/branches/dev/Share/ctrl/pro/hello.pro
Repository Root: $REPOS_URL
Revision: 8
Node Kind: file
Schedule: normal
#IF SVN1.8/9/10 Schedule: normal
#IF SVN1.14 Schedule: delete
#IF SVN1.14 Moved To: pro/hello.pro.renamed
Last Changed Author: $LOGNAME
Last Changed Rev: 6
Expand All @@ -174,11 +204,21 @@ file_cmp "$TEST_KEY.err" "$TEST_KEY.err" </dev/null
#-------------------------------------------------------------------------------
# Tests fcm conflicts: delete, rename, keep local (cat)
TEST_KEY=$TEST_KEY_BASE-keep-cat
run_pass "$TEST_KEY" cat pro/hello.pro
file_cmp "$TEST_KEY.out" "$TEST_KEY.out" <<__OUT__
if [[ $SVN_MINOR_VERSION == "1.14" ]]; then
run_pass "$TEST_KEY" cat pro/hello.pro.renamed
else
run_pass "$TEST_KEY" cat pro/hello.pro
fi
file_cmp_filtered "$TEST_KEY.out" "$TEST_KEY.out" <<__OUT__
PRO HELLO
END
#IF SVN1.14 <<<<<<< .working
Local contents (1)
#IF SVN1.14 ||||||| .old
#IF SVN1.14 =======
#IF SVN1.14 Merge contents (1)
#IF SVN1.14 Merge contents (2)
#IF SVN1.14 >>>>>>> .new
__OUT__
file_cmp "$TEST_KEY.err" "$TEST_KEY.err" </dev/null
teardown
Expand Down
4 changes: 2 additions & 2 deletions t/fcm-conflicts/06-tree-rename-delete.t
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Answer (n) to accept the external delete.
Keep the local version?
Enter "y" or "n" (or just press <return> for "n") D pro/hello.pro.renamed
#IF SVN1.8/9 Resolved conflicted state of 'pro/hello.pro'
#IF SVN1.10 Tree conflict at 'pro/hello.pro' marked as resolved.
#IF SVN1.10/14 Tree conflict at 'pro/hello.pro' marked as resolved.
__OUT__
file_cmp "$TEST_KEY.err" "$TEST_KEY.err" </dev/null
#-------------------------------------------------------------------------------
Expand Down Expand Up @@ -90,7 +90,7 @@ Answer (y) to accept the local rename.
Answer (n) to accept the external delete.
Keep the local version?
#IF SVN1.8/9 Enter "y" or "n" (or just press <return> for "n") Resolved conflicted state of 'pro/hello.pro'
#IF SVN1.10 Enter "y" or "n" (or just press <return> for "n") Tree conflict at 'pro/hello.pro' marked as resolved.
#IF SVN1.10/14 Enter "y" or "n" (or just press <return> for "n") Tree conflict at 'pro/hello.pro' marked as resolved.
__OUT__
file_cmp "$TEST_KEY.err" "$TEST_KEY.err" </dev/null
#-------------------------------------------------------------------------------
Expand Down
Loading

0 comments on commit c69b6bf

Please sign in to comment.