Skip to content

Commit d07bb0c

Browse files
committed
Merge branch 'ps/p4-tests-updates' into maint-2.46
Perforce tests have been updated. cf. <na5mwletzpnacietbc7pzqcgb622mvrwgrkjgjosysz3gvjcso@gzxxi7d7icr7> * ps/p4-tests-updates: t98xx: mark Perforce tests as memory-leak free ci: update Perforce version to r23.2 t98xx: fix Perforce tests with p4d r23 and newer
2 parents e6698fb + 63ee933 commit d07bb0c

36 files changed

+84
-9
lines changed

ci/install-dependencies.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
begin_group "Install dependencies"
99

10-
P4WHENCE=https://cdist2.perforce.com/perforce/r21.2
10+
P4WHENCE=https://cdist2.perforce.com/perforce/r23.2
1111
LFSWHENCE=https://github.com/github/git-lfs/releases/download/v$LINUX_GIT_LFS_VERSION
1212
JGITWHENCE=https://repo.eclipse.org/content/groups/releases//org/eclipse/jgit/org.eclipse.jgit.pgm/6.8.0.202311291450-r/org.eclipse.jgit.pgm-6.8.0.202311291450-r.sh
1313

t/t9800-git-p4-basic.sh

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ test_description='git p4 tests'
55
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
66
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
77

8+
TEST_PASSES_SANITIZE_LEAK=true
89
. ./lib-git-p4.sh
910

1011
test_expect_success 'start p4d' '
@@ -297,8 +298,20 @@ test_expect_success 'exit when p4 fails to produce marshaled output' '
297298
# p4 changes, files, or describe; just in p4 print. If P4CLIENT is unset, the
298299
# message will include "Librarian checkout".
299300
test_expect_success 'exit gracefully for p4 server errors' '
300-
test_when_finished "mv \"$db\"/depot/file1,v,hidden \"$db\"/depot/file1,v" &&
301-
mv "$db"/depot/file1,v "$db"/depot/file1,v,hidden &&
301+
# Note that newer Perforce versions started to store files
302+
# compressed in directories. The case statement handles both
303+
# old and new layout.
304+
case "$(echo "$db"/depot/file1*)" in
305+
*,v)
306+
test_when_finished "mv \"$db\"/depot/file1,v,hidden \"$db\"/depot/file1,v" &&
307+
mv "$db"/depot/file1,v "$db"/depot/file1,v,hidden;;
308+
*,d)
309+
path="$(echo "$db"/depot/file1,d/*.gz)" &&
310+
test_when_finished "mv \"$path\",hidden \"$path\"" &&
311+
mv "$path" "$path",hidden;;
312+
*)
313+
BUG "unhandled p4d layout";;
314+
esac &&
302315
test_when_finished cleanup_git &&
303316
test_expect_code 1 git p4 clone --dest="$git" //depot@1 >out 2>err &&
304317
test_grep "Error from p4 print" err

t/t9801-git-p4-branch.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ test_description='git p4 tests for p4 branches'
55
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
66
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
77

8+
TEST_PASSES_SANITIZE_LEAK=true
89
. ./lib-git-p4.sh
910

1011
test_expect_success 'start p4d' '

t/t9802-git-p4-filetype.sh

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
test_description='git p4 filetype tests'
44

5+
TEST_PASSES_SANITIZE_LEAK=true
56
. ./lib-git-p4.sh
67

78
test_expect_success 'start p4d' '
@@ -300,10 +301,22 @@ test_expect_success SYMLINKS 'empty symlink target' '
300301
# text
301302
# @@
302303
#
304+
# Note that newer Perforce versions started to store files
305+
# compressed in directories. The case statement handles both
306+
# old and new layout.
303307
cd "$db/depot" &&
304-
sed "/@target1/{; s/target1/@/; n; d; }" \
305-
empty-symlink,v >empty-symlink,v.tmp &&
306-
mv empty-symlink,v.tmp empty-symlink,v
308+
case "$(echo empty-symlink*)" in
309+
empty-symlink,v)
310+
sed "/@target1/{; s/target1/@/; n; d; }" \
311+
empty-symlink,v >empty-symlink,v.tmp &&
312+
mv empty-symlink,v.tmp empty-symlink,v;;
313+
empty-symlink,d)
314+
path="empty-symlink,d/$(ls empty-symlink,d/ | tail -n1)" &&
315+
rm "$path" &&
316+
gzip </dev/null >"$path";;
317+
*)
318+
BUG "unhandled p4d layout";;
319+
esac
307320
) &&
308321
(
309322
# Make sure symlink really is empty. Asking

t/t9803-git-p4-shell-metachars.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
test_description='git p4 transparency to shell metachars in filenames'
44

5+
TEST_PASSES_SANITIZE_LEAK=true
56
. ./lib-git-p4.sh
67

78
test_expect_success 'start p4d' '

t/t9804-git-p4-label.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
test_description='git p4 label tests'
44

5+
TEST_PASSES_SANITIZE_LEAK=true
56
. ./lib-git-p4.sh
67

78
test_expect_success 'start p4d' '

t/t9805-git-p4-skip-submit-edit.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
test_description='git p4 skipSubmitEdit config variables'
44

5+
TEST_PASSES_SANITIZE_LEAK=true
56
. ./lib-git-p4.sh
67

78
test_expect_success 'start p4d' '

t/t9806-git-p4-options.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ test_description='git p4 options'
55
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
66
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
77

8+
TEST_PASSES_SANITIZE_LEAK=true
89
. ./lib-git-p4.sh
910

1011
test_expect_success 'start p4d' '

t/t9808-git-p4-chdir.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
test_description='git p4 relative chdir'
44

5+
TEST_PASSES_SANITIZE_LEAK=true
56
. ./lib-git-p4.sh
67

78
test_expect_success 'start p4d' '

t/t9809-git-p4-client-view.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
test_description='git p4 client view'
44

5+
TEST_PASSES_SANITIZE_LEAK=true
56
. ./lib-git-p4.sh
67

78
test_expect_success 'start p4d' '

0 commit comments

Comments
 (0)