(test infrastructure) CLONE/PUSH macros redefined

redis
Sitaram Chamarty 2012-03-20 16:15:55 +05:30
parent bc2bd7a78c
commit 1ec8be663e
4 changed files with 67 additions and 67 deletions

View File

@ -45,8 +45,8 @@ try "
DEF CS_1 = pwd; //tmp/tsh_tempdir.*gitolite-admin/; git remote -v; ok; /file://gitolite-admin/
DEF CHECK_SETUP = CS_1; git log; ok; /6b18ec2ab0f765122ec133959b36c57f77d4565c/
DEF CLONE = glt clone
DEF PUSH = glt push
DEF CLONE = glt clone %1 file:///%2
DEF PUSH = glt push %1 origin
# clean install
mkdir -p $ENV{HOME}/bin

View File

@ -15,11 +15,11 @@ try "
# subtest 1
cd ..
CLONE dev2 file://gitolite-admin ga2
CLONE dev2 gitolite-admin ga2
!ok; gsh
/DENIED by fallthru/
/fatal: The remote end hung up unexpectedly/
CLONE admin --progress file://gitolite-admin ga2
glt clone admin --progress file:///gitolite-admin ga2
ok; gsh
/Counting/; /Compressing/; /Total/
cd gitolite-admin; ok
@ -41,12 +41,12 @@ try "
git add conf; ok
git status -s; ok; /M conf/gitolite.conf/
git commit -m t01a; ok; /master.*t01a/
PUSH dev2 origin; !ok; gsh
PUSH dev2; !ok; gsh
/DENIED by fallthru/
/fatal: The remote end hung up unexpectedly/
PUSH admin origin; ok; /master -> master/
PUSH admin; ok; /master -> master/
tsh empty; ok;
PUSH admin origin master:mm
PUSH admin master:mm
!ok; gsh
/DENIED by refs/heads/mm/
reject
@ -72,31 +72,31 @@ try "
# clone
cd ..; ok;
CLONE u1 file://t1; !ok; gsh
CLONE u1 t1; !ok; gsh
/DENIED by fallthru/
/fatal: The remote end hung up unexpectedly/
CLONE u2 file://t1; ok; gsh
CLONE u2 t1; ok; gsh
/warning: You appear to have cloned an empty repository./
ls -al t1; ok; /$ENV{USER}.*$ENV{USER}.*\.git/
cd t1; ok;
# push
test-commit tc1 tc2 tc2; ok; /a530e66/
PUSH u2 origin; !ok; gsh
PUSH u2; !ok; gsh
/DENIED by fallthru/
/fatal: The remote end hung up unexpectedly/
PUSH u3 origin master; ok; gsh
PUSH u3 master; ok; gsh
/master -> master/
# rewind
reset-h HEAD^; ok; /HEAD is now at aa2b5c5 tc2/
test-tick; test-commit tc3; ok; /3ffced1/
PUSH u3 origin; !ok; gsh
PUSH u3; !ok; gsh
/rejected.*master -> master.*non-fast-forward./
PUSH u3 -f origin; !ok; gsh
PUSH u3 -f; !ok; gsh
reject
/DENIED by fallthru/
PUSH u4 origin +master; ok; gsh
PUSH u4 +master; ok; gsh
/ \\+ a530e66...3ffced1 master -> master.*forced update./
";
@ -131,12 +131,12 @@ try "
";
try "
CLONE u1 file://aa; ok; gsh
CLONE u1 aa; ok; gsh
cd aa; ok
test-commit set3 t1 t2 t3 t4 t5 t6 t7 t8 t9
ok
PUSH u1 origin HEAD; ok; gsh
/To file://aa/
PUSH u1 HEAD; ok; gsh
/To file:///aa/
/\\* \\[new branch\\] HEAD -> master/
branch dev; ok
branch foo; ok
@ -144,52 +144,52 @@ try "
# u1 rewind master ok
reset-h HEAD^; ok
test-commit r1; ok
PUSH u1 origin +master; ok; gsh
/To file://aa/
PUSH u1 +master; ok; gsh
/To file:///aa/
/\\+ 27ed463...05adfb0 master -> master .forced update./
# u2 rewind master !ok
reset-h HEAD^; ok
test-commit r2; ok
PUSH u2 origin +master; !ok; gsh
PUSH u2 +master; !ok; gsh
reject
/DENIED by fallthru/
# u3 rewind master ok
reset-h HEAD^; ok
test-commit r3; ok
PUSH u3 origin +master; ok; gsh
/To file://aa/
PUSH u3 +master; ok; gsh
/To file:///aa/
/\\+ 05adfb0...6a532fe master -> master .forced update./
# u4 push master ok
test-commit u4; ok
PUSH u4 origin master; ok; gsh
/To file://aa/
PUSH u4 master; ok; gsh
/To file:///aa/
/6a532fe..f929773 +master -> master/
# u4 rewind master !ok
reset-h HEAD^; ok
PUSH u4 origin +master; !ok; gsh
PUSH u4 +master; !ok; gsh
reject
/DENIED by fallthru/
# u3,u4 push other branches !ok
PUSH u3 origin dev; !ok; gsh
PUSH u3 dev; !ok; gsh
reject
/DENIED by fallthru/
PUSH u4 origin dev; !ok; gsh
PUSH u4 dev; !ok; gsh
reject
/DENIED by fallthru/
PUSH u3 origin foo; !ok; gsh
PUSH u3 foo; !ok; gsh
reject
/DENIED by fallthru/
PUSH u4 origin foo; !ok; gsh
PUSH u4 foo; !ok; gsh
reject
/DENIED by fallthru/
# clean up for next set
PUSH u1 -f origin master dev foo
glt push u1 -f origin master dev foo
ok; gsh
/f929773...6a532fe master -> master .forced update./
/new branch.*dev -> dev/
@ -197,18 +197,18 @@ try "
# u5 push master !ok
test-commit u5
PUSH u5 origin master; !ok; gsh
PUSH u5 master; !ok; gsh
reject
/DENIED by refs/heads/master/
# u5 rewind dev ok
PUSH u5 origin +dev^:dev
PUSH u5 +dev^:dev
ok; gsh
/\\+ 27ed463...1ad477a dev\\^ -> dev .forced update./
# u5 rewind foo !ok
PUSH u5 origin +foo^:foo
PUSH u5 +foo^:foo
!ok; gsh
reject
/remote: FATAL: \\+ refs/heads/foo aa u5 DENIED by fallthru/
@ -218,15 +218,15 @@ try "
/Switched to branch 'foo'/
test-commit u5
PUSH u5 origin foo; ok; gsh
PUSH u5 foo; ok; gsh
/27ed463..83da62c *foo -> foo/
# u1 delete dev ok
PUSH u1 origin :dev; ok; gsh
PUSH u1 :dev; ok; gsh
/ - \\[deleted\\] *dev/
# push it back
PUSH u1 origin dev; ok; gsh
PUSH u1 dev; ok; gsh
/\\* \\[new branch\\] *dev -> dev/
";
@ -244,15 +244,15 @@ try "
cd ..; ok
CLONE tester file://r1; ok; gsh
CLONE tester r1; ok; gsh
/Cloning into 'r1'.../
cd r1; ok
test-commit r1a r1b r1c r1d r1e r1f
ok
PUSH tester origin HEAD; ok; gsh
PUSH tester HEAD; ok; gsh
/\\* \\[new branch\\] *HEAD -> master/
git branch v1
PUSH tester origin v1; ok; gsh
PUSH tester v1; ok; gsh
/\\* \\[new branch\\] *v1 -> v1/
";
@ -271,14 +271,14 @@ try "
cd ..; ok
CLONE tester file://r2; ok; gsh
CLONE tester r2; ok; gsh
/Cloning into 'r2'.../
cd r2; ok
test-commit r2a r2b r2c r2d r2e r2f
ok
PUSH tester origin HEAD; ok; gsh
PUSH tester HEAD; ok; gsh
/\\* \\[new branch\\] *HEAD -> master/
git branch v1
PUSH tester origin v1; !ok; gsh
PUSH tester v1; !ok; gsh
/W refs/heads/v1 r2 tester DENIED by refs/heads/v\\[0-9\\]/
"

View File

@ -33,20 +33,20 @@ try "
ADMIN_PUSH vr1a
cd ..
ls -al foo; !ok; /cannot access foo: No such file or directory/
CLONE u1 file://foo; ok; /Cloning into/
CLONE u1 foo; ok; /Cloning into/
/You appear to have cloned an empty/
cd foo; ok
ls -Al; ok; /\.git/
# VREF not called for u1
tc a1 a2 a3 a4 a5; ok; /aaf9e8e/
PUSH u1 origin master; ok; /new branch.*master -. master/
PUSH u1 master; ok; /new branch.*master -. master/
!/helper program missing/
!/hook declined/
!/remote rejected/
# VREF is called for u2
tc b1; ok; /1f440d3/
PUSH u2 origin; !ok; /helper program missing/
PUSH u2; !ok; /helper program missing/
/hook declined/
/remote rejected/
";
@ -73,48 +73,48 @@ try "
cd ../foo; ok
# u2 1 file
PUSH u2 origin; ok; /aaf9e8e..1f440d3.*master -. master/
PUSH u2; ok; /aaf9e8e..1f440d3.*master -. master/
# u2 2 files
tc b2 b3; ok; /c3397f7/
PUSH u2 origin; ok; /1f440d3..c3397f7.*master -. master/
PUSH u2; ok; /1f440d3..c3397f7.*master -. master/
# u2 3 files
tc c1 c2 c3; ok; /be242d7/
PUSH u2 origin; !ok; /W VREF/COUNT/2 foo u2 DENIED by VREF/COUNT/2/
PUSH u2; !ok; /W VREF/COUNT/2 foo u2 DENIED by VREF/COUNT/2/
/too many changed files in this push/
/hook declined/
/remote rejected/
# u4 3 files
PUSH u4 origin; ok; /c3397f7..be242d7.*master -. master/
PUSH u4; ok; /c3397f7..be242d7.*master -. master/
# u4 4 files
tc d1 d2 d3 d4; ok; /88d80e2/
PUSH u4 origin; ok; /be242d7..88d80e2.*master -. master/
PUSH u4; ok; /be242d7..88d80e2.*master -. master/
# u4 5 files
tc d5 d6 d7 d8 d9; ok; /e9c60b0/
PUSH u4 origin; !ok; /W VREF/COUNT/4 foo u4 DENIED by VREF/COUNT/4/
PUSH u4; !ok; /W VREF/COUNT/4 foo u4 DENIED by VREF/COUNT/4/
/too many changed files in this push/
/hook declined/
/remote rejected/
# u1 all files
PUSH u1 origin; ok; /88d80e2..e9c60b0.*master -. master/
PUSH u1; ok; /88d80e2..e9c60b0.*master -. master/
# u6 6 old files
test-tick
tc d1 d2 d3 d4 d5 d6
ok; /2773f0a/
PUSH u6 origin; ok; /e9c60b0..2773f0a.*master -. master/
PUSH u6; ok; /e9c60b0..2773f0a.*master -. master/
tag six
# u6 updates 7 old files
test-tick; test-tick
tc d1 d2 d3 d4 d5 d6 d7
ok; /d3fb574/
PUSH u6 origin; !ok; /W VREF/COUNT/6 foo u6 DENIED by VREF/COUNT/6/
PUSH u6; !ok; /W VREF/COUNT/6 foo u6 DENIED by VREF/COUNT/6/
/too many changed files in this push/
/hook declined/
/remote rejected/
@ -124,7 +124,7 @@ try "
test-tick; test-tick
tc d1 d2 n1 n2 n3 n4
ok; /9e90848/
PUSH u6 origin; !ok; /W VREF/COUNT/3/NEWFILES foo u6 DENIED by VREF/COUNT/3/NEWFILES/
PUSH u6; !ok; /W VREF/COUNT/3/NEWFILES foo u6 DENIED by VREF/COUNT/3/NEWFILES/
/too many new files in this push/
/hook declined/
/remote rejected/
@ -134,5 +134,5 @@ try "
test-tick; test-tick
tc d1 d2 d3 n1 n2 n3
ok; /e47ff5d/
PUSH u6 origin; ok; /2773f0a..e47ff5d.*master -. master/
PUSH u6; ok; /2773f0a..e47ff5d.*master -. master/
";

View File

@ -33,7 +33,7 @@ try "
cd ..
# setup
ls -al foo; !ok; /cannot access foo: No such file or directory/
CLONE u1 file://foo; ok; /Cloning into/
CLONE u1 foo; ok; /Cloning into/
/You appear to have cloned an empty/
cd foo; ok
ls -Al; ok; /\.git/
@ -41,16 +41,16 @@ try "
# u1 push 15 new files
tc a b c d e f g h i j k l m n o
ok; /d8c0392/
PUSH u1 origin master; ok; /new branch.*master -. master/
PUSH u1 master; ok; /new branch.*master -. master/
# u2 push 2 new 10 old without signoff
tc a b c d e f g h i j u2a u2b
ok; /6787ac9/
PUSH u2 origin; ok; /d8c0392..6787ac9.*master -. master/
PUSH u2; ok; /d8c0392..6787ac9.*master -. master/
# u2 fail to push 3 new files without signoff
tc u2c u2d u2e; ok; /a74562b/
PUSH u2 origin; !ok; /W VREF/COUNT/2/NO_SIGNOFF foo u2 DENIED by VREF/COUNT/2/NO_SIGNOFF/
PUSH u2; !ok; /W VREF/COUNT/2/NO_SIGNOFF foo u2 DENIED by VREF/COUNT/2/NO_SIGNOFF/
/top commit message should include the text .3 new files signed-off by: tester.example.com./
/hook declined/
/remote rejected/
@ -59,16 +59,16 @@ try "
ok; /8dd31aa/
git commit --allow-empty -m '15 new files signed-off by: tester\@example.com'
ok; /.master 6126489. 15 new files signed-off by: tester.example.com/
PUSH u2 origin; ok; /6787ac9..6126489.*master -. master/
PUSH u2; ok; /6787ac9..6126489.*master -. master/
# u4 push 2 new 10 old files without signoff
tc u4a u4b a b c d e f g h i j
ok; /76c5593/
PUSH u4 origin; ok; /6126489..76c5593.*master -. master/
PUSH u4; ok; /6126489..76c5593.*master -. master/
# u4 fail push 3 new files withoug signoff
tc u4c u4d u4e; ok; /2a84398/
PUSH u4 origin; !ok; /W VREF/COUNT/2/NO_SIGNOFF foo u4 DENIED by VREF/COUNT/2/NO_SIGNOFF/
PUSH u4; !ok; /W VREF/COUNT/2/NO_SIGNOFF foo u4 DENIED by VREF/COUNT/2/NO_SIGNOFF/
/top commit message should include the text .3 new files signed-off by: tester.example.com./
/hook declined/
/remote rejected/
@ -78,14 +78,14 @@ try "
ok; /09b646a/
git commit --allow-empty -m '10 new files signed-off by: tester\@example.com'
ok; /.master 47f84b0. 10 new files signed-off by: tester.example.com/
PUSH u4 origin; ok; /76c5593..47f84b0.*master -. master/
PUSH u4; ok; /76c5593..47f84b0.*master -. master/
# u4 fail push 11 new files even with signoff
tc u4ab u4ac u4ad u4ae u4af u4ag u4ah u4ai u4aj u4ak u4al
ok; /90e7344/
git commit --allow-empty -m '11 new files signed-off by: tester\@example.com'
ok; /.master 1f36537. 11 new files signed-off by: tester.example.com/
PUSH u4 origin; !ok; /W VREF/COUNT/10/NEWFILES foo u4 DENIED by VREF/COUNT/10/NEWFILES/
PUSH u4; !ok; /W VREF/COUNT/10/NEWFILES foo u4 DENIED by VREF/COUNT/10/NEWFILES/
/too many new files in this push/
/hook declined/
/remote rejected/
@ -94,7 +94,7 @@ try "
glt fetch u1 origin; ok;
reset-h origin/master; ok;
tc not-really.java; ok; /0f88b2e/
PUSH u4 origin; ok; /47f84b0..0f88b2e.*master -. master/
PUSH u4; ok; /47f84b0..0f88b2e.*master -. master/
";
put "|cat >> not-really.java", "
@ -103,7 +103,7 @@ put "|cat >> not-really.java", "
try "
commit -am pbc; ok; /b2df6ef/
PUSH u4 origin; !ok; /W VREF/FILETYPE/AUTOGENERATED foo u4 DENIED by VREF/FILETYPE/AUTOGENERATED/
PUSH u4; !ok; /W VREF/FILETYPE/AUTOGENERATED foo u4 DENIED by VREF/FILETYPE/AUTOGENERATED/
/hook declined/
/remote rejected/
";