mirror of
https://github.com/git/git.git
synced 2025-03-31 12:54:09 +00:00
Revert "fix testsuite: make sure they use templates freshly built from the source"
This reverts commit 74d20040cafdced657efbf49795183d209a3a07b. Version from Johannes to introduce GIT_TEMPLATE_DIR is simpler, although I unconsciously stayed away from introducing yet another environment variable.
This commit is contained in:
parent
74d20040ca
commit
171e800b37
@ -50,12 +50,12 @@ test_expect_success 'setup separate repository lacking postimage' '
|
|||||||
|
|
||||||
git tar-tree initial initial | tar xf - &&
|
git tar-tree initial initial | tar xf - &&
|
||||||
(
|
(
|
||||||
cd initial && git_init_db && git add .
|
cd initial && git init-db && git add .
|
||||||
) &&
|
) &&
|
||||||
|
|
||||||
git tar-tree second second | tar xf - &&
|
git tar-tree second second | tar xf - &&
|
||||||
(
|
(
|
||||||
cd second && git_init_db && git add .
|
cd second && git init-db && git add .
|
||||||
)
|
)
|
||||||
|
|
||||||
'
|
'
|
||||||
|
@ -44,7 +44,7 @@ test_expect_success \
|
|||||||
'unpack without delta' \
|
'unpack without delta' \
|
||||||
"GIT_OBJECT_DIRECTORY=.git2/objects &&
|
"GIT_OBJECT_DIRECTORY=.git2/objects &&
|
||||||
export GIT_OBJECT_DIRECTORY &&
|
export GIT_OBJECT_DIRECTORY &&
|
||||||
git_init_db &&
|
git-init-db &&
|
||||||
git-unpack-objects -n <test-1-${packname_1}.pack &&
|
git-unpack-objects -n <test-1-${packname_1}.pack &&
|
||||||
git-unpack-objects <test-1-${packname_1}.pack"
|
git-unpack-objects <test-1-${packname_1}.pack"
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ test_expect_success \
|
|||||||
'unpack with delta' \
|
'unpack with delta' \
|
||||||
'GIT_OBJECT_DIRECTORY=.git2/objects &&
|
'GIT_OBJECT_DIRECTORY=.git2/objects &&
|
||||||
export GIT_OBJECT_DIRECTORY &&
|
export GIT_OBJECT_DIRECTORY &&
|
||||||
git_init_db &&
|
git-init-db &&
|
||||||
git-unpack-objects -n <test-2-${packname_2}.pack &&
|
git-unpack-objects -n <test-2-${packname_2}.pack &&
|
||||||
git-unpack-objects <test-2-${packname_2}.pack'
|
git-unpack-objects <test-2-${packname_2}.pack'
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ test_expect_success \
|
|||||||
'use packed objects' \
|
'use packed objects' \
|
||||||
'GIT_OBJECT_DIRECTORY=.git2/objects &&
|
'GIT_OBJECT_DIRECTORY=.git2/objects &&
|
||||||
export GIT_OBJECT_DIRECTORY &&
|
export GIT_OBJECT_DIRECTORY &&
|
||||||
git_init_db &&
|
git-init-db &&
|
||||||
cp test-1-${packname_1}.pack test-1-${packname_1}.idx .git2/objects/pack && {
|
cp test-1-${packname_1}.pack test-1-${packname_1}.idx .git2/objects/pack && {
|
||||||
git-diff-tree --root -p $commit &&
|
git-diff-tree --root -p $commit &&
|
||||||
while read object
|
while read object
|
||||||
|
@ -24,7 +24,7 @@ test_expect_success setup '
|
|||||||
parent=$commit || return 1
|
parent=$commit || return 1
|
||||||
done &&
|
done &&
|
||||||
git-update-ref HEAD "$commit" &&
|
git-update-ref HEAD "$commit" &&
|
||||||
git_clone -l ./. victim &&
|
git-clone -l ./. victim &&
|
||||||
cd victim &&
|
cd victim &&
|
||||||
git-log &&
|
git-log &&
|
||||||
cd .. &&
|
cd .. &&
|
||||||
|
@ -97,7 +97,7 @@ pull_to_client () {
|
|||||||
(
|
(
|
||||||
mkdir client &&
|
mkdir client &&
|
||||||
cd client &&
|
cd client &&
|
||||||
git_init_db 2>> log2.txt
|
git-init-db 2>> log2.txt
|
||||||
)
|
)
|
||||||
|
|
||||||
add A1
|
add A1
|
||||||
|
@ -15,12 +15,12 @@ test_expect_success setup '
|
|||||||
git commit -a -m original'
|
git commit -a -m original'
|
||||||
|
|
||||||
test_expect_success "clone and setup child repos" '
|
test_expect_success "clone and setup child repos" '
|
||||||
git_clone . one &&
|
git clone . one &&
|
||||||
cd one &&
|
cd one &&
|
||||||
echo >file updated by one &&
|
echo >file updated by one &&
|
||||||
git commit -a -m "updated by one" &&
|
git commit -a -m "updated by one" &&
|
||||||
cd .. &&
|
cd .. &&
|
||||||
git_clone . two &&
|
git clone . two &&
|
||||||
cd two &&
|
cd two &&
|
||||||
git repo-config branch.master.remote one &&
|
git repo-config branch.master.remote one &&
|
||||||
{
|
{
|
||||||
@ -28,7 +28,7 @@ test_expect_success "clone and setup child repos" '
|
|||||||
echo "Pull: refs/heads/master:refs/heads/one"
|
echo "Pull: refs/heads/master:refs/heads/one"
|
||||||
} >.git/remotes/one
|
} >.git/remotes/one
|
||||||
cd .. &&
|
cd .. &&
|
||||||
git_clone . three &&
|
git clone . three &&
|
||||||
cd three &&
|
cd three &&
|
||||||
git repo-config branch.master.remote two &&
|
git repo-config branch.master.remote two &&
|
||||||
git repo-config branch.master.merge refs/heads/one &&
|
git repo-config branch.master.merge refs/heads/one &&
|
||||||
@ -74,7 +74,7 @@ test_expect_success 'fetch following tags' '
|
|||||||
|
|
||||||
mkdir four &&
|
mkdir four &&
|
||||||
cd four &&
|
cd four &&
|
||||||
git_init_db &&
|
git init-db &&
|
||||||
|
|
||||||
git fetch .. :track &&
|
git fetch .. :track &&
|
||||||
git show-ref --verify refs/tags/anno &&
|
git show-ref --verify refs/tags/anno &&
|
||||||
|
@ -17,7 +17,7 @@ test_expect_success setup '
|
|||||||
test_expect_success 'pulling into void' '
|
test_expect_success 'pulling into void' '
|
||||||
mkdir cloned &&
|
mkdir cloned &&
|
||||||
cd cloned &&
|
cd cloned &&
|
||||||
git_init_db &&
|
git init-db &&
|
||||||
git pull ..
|
git pull ..
|
||||||
'
|
'
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ remove the directory before attempting a clone again.'
|
|||||||
|
|
||||||
test_expect_failure \
|
test_expect_failure \
|
||||||
'clone of non-existent source should fail' \
|
'clone of non-existent source should fail' \
|
||||||
'git_clone foo bar'
|
'git-clone foo bar'
|
||||||
|
|
||||||
test_expect_failure \
|
test_expect_failure \
|
||||||
'failed clone should not leave a directory' \
|
'failed clone should not leave a directory' \
|
||||||
@ -29,11 +29,11 @@ test_create_repo foo
|
|||||||
# current path not to the target dir
|
# current path not to the target dir
|
||||||
test_expect_failure \
|
test_expect_failure \
|
||||||
'clone of non-existent (relative to $PWD) source should fail' \
|
'clone of non-existent (relative to $PWD) source should fail' \
|
||||||
'git_clone ../foo baz'
|
'git-clone ../foo baz'
|
||||||
|
|
||||||
test_expect_success \
|
test_expect_success \
|
||||||
'clone should work now that source exists' \
|
'clone should work now that source exists' \
|
||||||
'git_clone foo bar'
|
'git-clone foo bar'
|
||||||
|
|
||||||
test_expect_success \
|
test_expect_success \
|
||||||
'successfull clone must leave the directory' \
|
'successfull clone must leave the directory' \
|
||||||
|
@ -17,7 +17,7 @@ git commit -m initial'
|
|||||||
cd "$base_dir"
|
cd "$base_dir"
|
||||||
|
|
||||||
test_expect_success 'preparing second repository' \
|
test_expect_success 'preparing second repository' \
|
||||||
'git_clone A B && cd B &&
|
'git clone A B && cd B &&
|
||||||
echo second > file2 &&
|
echo second > file2 &&
|
||||||
git add file2 &&
|
git add file2 &&
|
||||||
git commit -m addition &&
|
git commit -m addition &&
|
||||||
@ -27,7 +27,7 @@ git prune'
|
|||||||
cd "$base_dir"
|
cd "$base_dir"
|
||||||
|
|
||||||
test_expect_success 'cloning with reference' \
|
test_expect_success 'cloning with reference' \
|
||||||
'git_clone -l -s --reference B A C'
|
'git clone -l -s --reference B A C'
|
||||||
|
|
||||||
cd "$base_dir"
|
cd "$base_dir"
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ git prune'
|
|||||||
cd "$base_dir"
|
cd "$base_dir"
|
||||||
|
|
||||||
test_expect_success 'preparing second repository' \
|
test_expect_success 'preparing second repository' \
|
||||||
'git_clone -l -s A B && cd B &&
|
'git clone -l -s A B && cd B &&
|
||||||
echo "foo bar" > file2 &&
|
echo "foo bar" > file2 &&
|
||||||
git add file2 &&
|
git add file2 &&
|
||||||
git commit -m "next commit" file2 &&
|
git commit -m "next commit" file2 &&
|
||||||
@ -44,7 +44,7 @@ git prune'
|
|||||||
cd "$base_dir"
|
cd "$base_dir"
|
||||||
|
|
||||||
test_expect_success 'preparing third repository' \
|
test_expect_success 'preparing third repository' \
|
||||||
'git_clone -l -s B C && cd C &&
|
'git clone -l -s B C && cd C &&
|
||||||
echo "Goodbye, cruel world" > file3 &&
|
echo "Goodbye, cruel world" > file3 &&
|
||||||
git add file3 &&
|
git add file3 &&
|
||||||
git commit -m "one more" file3 &&
|
git commit -m "one more" file3 &&
|
||||||
@ -54,11 +54,11 @@ git prune'
|
|||||||
cd "$base_dir"
|
cd "$base_dir"
|
||||||
|
|
||||||
test_expect_failure 'creating too deep nesting' \
|
test_expect_failure 'creating too deep nesting' \
|
||||||
'git_clone -l -s C D &&
|
'git clone -l -s C D &&
|
||||||
git_clone -l -s D E &&
|
git clone -l -s D E &&
|
||||||
git_clone -l -s E F &&
|
git clone -l -s E F &&
|
||||||
git_clone -l -s F G &&
|
git clone -l -s F G &&
|
||||||
git_clone -l -s G H &&
|
git clone -l -s G H &&
|
||||||
cd H &&
|
cd H &&
|
||||||
test_valid_repo'
|
test_valid_repo'
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ test_expect_success \
|
|||||||
|
|
||||||
test_expect_success "Michael Cassar's test case" '
|
test_expect_success "Michael Cassar's test case" '
|
||||||
rm -fr .git papers partA &&
|
rm -fr .git papers partA &&
|
||||||
git_init_db &&
|
git init-db &&
|
||||||
mkdir -p papers/unsorted papers/all-papers partA &&
|
mkdir -p papers/unsorted papers/all-papers partA &&
|
||||||
echo a > papers/unsorted/Thesis.pdf &&
|
echo a > papers/unsorted/Thesis.pdf &&
|
||||||
echo b > partA/outline.txt &&
|
echo b > partA/outline.txt &&
|
||||||
@ -109,7 +109,7 @@ rm -fr papers partA path?
|
|||||||
|
|
||||||
test_expect_success "Sergey Vlasov's test case" '
|
test_expect_success "Sergey Vlasov's test case" '
|
||||||
rm -fr .git &&
|
rm -fr .git &&
|
||||||
git_init_db &&
|
git init-db &&
|
||||||
mkdir ab &&
|
mkdir ab &&
|
||||||
date >ab.c &&
|
date >ab.c &&
|
||||||
date >ab/d &&
|
date >ab/d &&
|
||||||
|
@ -182,16 +182,6 @@ test_create_repo () {
|
|||||||
cd "$owd"
|
cd "$owd"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Many tests do init-db and clone but they must be told about the freshly
|
|
||||||
# built templates.
|
|
||||||
git_init_db () {
|
|
||||||
git init-db --template="$GIT_EXEC_PATH/templates/blt/" "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
git_clone () {
|
|
||||||
git clone --template="$GIT_EXEC_PATH/templates/blt/" "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
test_done () {
|
test_done () {
|
||||||
trap - exit
|
trap - exit
|
||||||
case "$test_failure" in
|
case "$test_failure" in
|
||||||
|
Loading…
x
Reference in New Issue
Block a user