mirror of
https://github.com/git/git
synced 2024-09-29 21:27:13 +00:00
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
This commit is contained in:
commit
d07bb0cd2a
|
@ -7,7 +7,7 @@
|
|||
|
||||
begin_group "Install dependencies"
|
||||
|
||||
P4WHENCE=https://cdist2.perforce.com/perforce/r21.2
|
||||
P4WHENCE=https://cdist2.perforce.com/perforce/r23.2
|
||||
LFSWHENCE=https://github.com/github/git-lfs/releases/download/v$LINUX_GIT_LFS_VERSION
|
||||
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
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ test_description='git p4 tests'
|
|||
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
|
||||
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./lib-git-p4.sh
|
||||
|
||||
test_expect_success 'start p4d' '
|
||||
|
@ -297,8 +298,20 @@ test_expect_success 'exit when p4 fails to produce marshaled output' '
|
|||
# p4 changes, files, or describe; just in p4 print. If P4CLIENT is unset, the
|
||||
# message will include "Librarian checkout".
|
||||
test_expect_success 'exit gracefully for p4 server errors' '
|
||||
test_when_finished "mv \"$db\"/depot/file1,v,hidden \"$db\"/depot/file1,v" &&
|
||||
mv "$db"/depot/file1,v "$db"/depot/file1,v,hidden &&
|
||||
# Note that newer Perforce versions started to store files
|
||||
# compressed in directories. The case statement handles both
|
||||
# old and new layout.
|
||||
case "$(echo "$db"/depot/file1*)" in
|
||||
*,v)
|
||||
test_when_finished "mv \"$db\"/depot/file1,v,hidden \"$db\"/depot/file1,v" &&
|
||||
mv "$db"/depot/file1,v "$db"/depot/file1,v,hidden;;
|
||||
*,d)
|
||||
path="$(echo "$db"/depot/file1,d/*.gz)" &&
|
||||
test_when_finished "mv \"$path\",hidden \"$path\"" &&
|
||||
mv "$path" "$path",hidden;;
|
||||
*)
|
||||
BUG "unhandled p4d layout";;
|
||||
esac &&
|
||||
test_when_finished cleanup_git &&
|
||||
test_expect_code 1 git p4 clone --dest="$git" //depot@1 >out 2>err &&
|
||||
test_grep "Error from p4 print" err
|
||||
|
|
|
@ -5,6 +5,7 @@ test_description='git p4 tests for p4 branches'
|
|||
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
|
||||
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./lib-git-p4.sh
|
||||
|
||||
test_expect_success 'start p4d' '
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='git p4 filetype tests'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./lib-git-p4.sh
|
||||
|
||||
test_expect_success 'start p4d' '
|
||||
|
@ -300,10 +301,22 @@ test_expect_success SYMLINKS 'empty symlink target' '
|
|||
# text
|
||||
# @@
|
||||
#
|
||||
# Note that newer Perforce versions started to store files
|
||||
# compressed in directories. The case statement handles both
|
||||
# old and new layout.
|
||||
cd "$db/depot" &&
|
||||
sed "/@target1/{; s/target1/@/; n; d; }" \
|
||||
empty-symlink,v >empty-symlink,v.tmp &&
|
||||
mv empty-symlink,v.tmp empty-symlink,v
|
||||
case "$(echo empty-symlink*)" in
|
||||
empty-symlink,v)
|
||||
sed "/@target1/{; s/target1/@/; n; d; }" \
|
||||
empty-symlink,v >empty-symlink,v.tmp &&
|
||||
mv empty-symlink,v.tmp empty-symlink,v;;
|
||||
empty-symlink,d)
|
||||
path="empty-symlink,d/$(ls empty-symlink,d/ | tail -n1)" &&
|
||||
rm "$path" &&
|
||||
gzip </dev/null >"$path";;
|
||||
*)
|
||||
BUG "unhandled p4d layout";;
|
||||
esac
|
||||
) &&
|
||||
(
|
||||
# Make sure symlink really is empty. Asking
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='git p4 transparency to shell metachars in filenames'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./lib-git-p4.sh
|
||||
|
||||
test_expect_success 'start p4d' '
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='git p4 label tests'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./lib-git-p4.sh
|
||||
|
||||
test_expect_success 'start p4d' '
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='git p4 skipSubmitEdit config variables'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./lib-git-p4.sh
|
||||
|
||||
test_expect_success 'start p4d' '
|
||||
|
|
|
@ -5,6 +5,7 @@ test_description='git p4 options'
|
|||
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
|
||||
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./lib-git-p4.sh
|
||||
|
||||
test_expect_success 'start p4d' '
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='git p4 relative chdir'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./lib-git-p4.sh
|
||||
|
||||
test_expect_success 'start p4d' '
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='git p4 client view'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./lib-git-p4.sh
|
||||
|
||||
test_expect_success 'start p4d' '
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='git p4 rcs keywords'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./lib-git-p4.sh
|
||||
|
||||
CP1252="\223\224"
|
||||
|
|
|
@ -5,6 +5,7 @@ test_description='git p4 label tests'
|
|||
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
|
||||
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./lib-git-p4.sh
|
||||
|
||||
test_expect_success 'start p4d' '
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='git p4 wildcards'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./lib-git-p4.sh
|
||||
|
||||
test_expect_success 'start p4d' '
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='git p4 preserve users'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./lib-git-p4.sh
|
||||
|
||||
test_expect_success 'start p4d' '
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='git p4 rename'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./lib-git-p4.sh
|
||||
|
||||
test_expect_success 'start p4d' '
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='git p4 submit failure handling'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./lib-git-p4.sh
|
||||
|
||||
test_expect_success 'start p4d' '
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='git p4 locked file behavior'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./lib-git-p4.sh
|
||||
|
||||
test_expect_success 'start p4d' '
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='git p4 tests for excluded paths during clone and sync'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./lib-git-p4.sh
|
||||
|
||||
test_expect_success 'start p4d' '
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='git p4 fetching changes in multiple blocks'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./lib-git-p4.sh
|
||||
|
||||
test_expect_success 'start p4d' '
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='interaction with P4 case-folding'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./lib-git-p4.sh
|
||||
|
||||
if test_have_prereq CASE_INSENSITIVE_FS
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='git p4 handling of EDITOR'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./lib-git-p4.sh
|
||||
|
||||
test_expect_success 'start p4d' '
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='Clone repositories with path case variations'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./lib-git-p4.sh
|
||||
|
||||
test_expect_success 'start p4d with case folding enabled' '
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='Clone repositories with non ASCII paths'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./lib-git-p4.sh
|
||||
|
||||
UTF8_ESCAPED="a-\303\244_o-\303\266_u-\303\274.txt"
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='Clone repositories and store files in Mock LFS'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./lib-git-p4.sh
|
||||
|
||||
test_file_is_not_in_mock_lfs () {
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='git p4 handling of UTF-16 files without BOM'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./lib-git-p4.sh
|
||||
|
||||
UTF16="\227\000\227\000"
|
||||
|
@ -22,9 +23,25 @@ test_expect_success 'init depot with UTF-16 encoded file and artificially remove
|
|||
cd db &&
|
||||
p4d -jc &&
|
||||
# P4D automatically adds a BOM. Remove it here to make the file invalid.
|
||||
sed -e "\$d" depot/file1,v >depot/file1,v.new &&
|
||||
mv depot/file1,v.new depot/file1,v &&
|
||||
printf "@$UTF16@" >>depot/file1,v &&
|
||||
#
|
||||
# Note that newer Perforce versions started to store files
|
||||
# compressed in directories. The case statement handles both
|
||||
# old and new layout.
|
||||
case "$(echo depot/file1*)" in
|
||||
depot/file1,v)
|
||||
sed -e "\$d" depot/file1,v >depot/file1,v.new &&
|
||||
mv depot/file1,v.new depot/file1,v &&
|
||||
printf "@$UTF16@" >>depot/file1,v;;
|
||||
depot/file1,d)
|
||||
path="$(echo depot/file1,d/*.gz)" &&
|
||||
gunzip -c "$path" >"$path.unzipped" &&
|
||||
sed -e "\$d" "$path.unzipped" >"$path.new" &&
|
||||
printf "$UTF16" >>"$path.new" &&
|
||||
gzip -c "$path.new" >"$path" &&
|
||||
rm "$path.unzipped" "$path.new";;
|
||||
*)
|
||||
BUG "unhandled p4d layout";;
|
||||
esac &&
|
||||
p4d -jrF checkpoint.1
|
||||
)
|
||||
'
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='Clone repositories and keep empty commits'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./lib-git-p4.sh
|
||||
|
||||
test_expect_success 'start p4d' '
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='git p4 support for file type change'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./lib-git-p4.sh
|
||||
|
||||
test_expect_success 'start p4d' '
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='Clone repositories and map users'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./lib-git-p4.sh
|
||||
|
||||
test_expect_success 'start p4d' '
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='git p4 retrieve job info'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./lib-git-p4.sh
|
||||
|
||||
test_expect_success 'start p4d' '
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='git p4 symlinked directories'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./lib-git-p4.sh
|
||||
|
||||
test_expect_success 'start p4d' '
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='git p4 with server triggers'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./lib-git-p4.sh
|
||||
|
||||
test_expect_success 'start p4d' '
|
||||
|
|
|
@ -6,6 +6,7 @@ last_shelved_change () {
|
|||
|
||||
test_description='git p4 unshelve'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./lib-git-p4.sh
|
||||
|
||||
test_expect_success 'start p4d' '
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
test_description='git p4 errors'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./lib-git-p4.sh
|
||||
|
||||
test_expect_success 'start p4d' '
|
||||
|
|
|
@ -6,6 +6,7 @@ This test creates files and directories with the same name in perforce and
|
|||
checks that git-p4 recovers from the error at the same time as the perforce
|
||||
repository.'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./lib-git-p4.sh
|
||||
|
||||
test_expect_success 'start p4d' '
|
||||
|
|
|
@ -6,6 +6,7 @@ This test checks that the import process handles inconsistent text
|
|||
encoding in p4 metadata (author names, commit messages, etc) without
|
||||
failing, and produces maximally sane output in git.'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./lib-git-p4.sh
|
||||
|
||||
python_target_version='2'
|
||||
|
|
|
@ -6,6 +6,7 @@ This test checks that the import process handles inconsistent text
|
|||
encoding in p4 metadata (author names, commit messages, etc) without
|
||||
failing, and produces maximally sane output in git.'
|
||||
|
||||
TEST_PASSES_SANITIZE_LEAK=true
|
||||
. ./lib-git-p4.sh
|
||||
|
||||
python_target_version='3'
|
||||
|
|
Loading…
Reference in a new issue