tests/test-init.t
changeset 14186 8513bd2e7259
parent 13604 3f6a4579f803
child 14905 207935cda6dc
--- a/tests/test-init.t	Thu May 05 01:47:46 2011 +0200
+++ b/tests/test-init.t	Thu May 05 01:47:46 2011 +0200
@@ -1,26 +1,5 @@
 This test tries to exercise the ssh functionality with a dummy script
 
-  $ cat <<EOF > dummyssh
-  > import sys
-  > import os
-  > 
-  > os.chdir(os.path.dirname(sys.argv[0]))
-  > if sys.argv[1] != "user@dummy":
-  >     sys.exit(-1)
-  > 
-  > if not os.path.exists("dummyssh"):
-  >     sys.exit(-1)
-  > 
-  > log = open("dummylog", "ab")
-  > log.write("Got arguments")
-  > for i, arg in enumerate(sys.argv[1:]):
-  >     log.write(" %d:%s" % (i+1, arg))
-  > log.write("\n")
-  > log.close()
-  > r = os.system(sys.argv[2])
-  > sys.exit(bool(r))
-  > EOF
-
   $ checknewrepo()
   > {
   >    name=$1
@@ -80,7 +59,7 @@
 
 init+push to remote2
 
-  $ hg init -e "python ./dummyssh" ssh://user@dummy/remote2
+  $ hg init -e "python $TESTDIR/dummyssh" ssh://user@dummy/remote2
   $ hg incoming -R remote2 local
   comparing with local
   changeset:   0:08b9e9f63b32
@@ -90,7 +69,7 @@
   summary:     init
   
 
-  $ hg push -R local -e "python ./dummyssh" ssh://user@dummy/remote2
+  $ hg push -R local -e "python $TESTDIR/dummyssh" ssh://user@dummy/remote2
   pushing to ssh://user@dummy/remote2
   searching for changes
   remote: adding changesets
@@ -100,7 +79,7 @@
 
 clone to remote1
 
-  $ hg clone -e "python ./dummyssh" local ssh://user@dummy/remote1
+  $ hg clone -e "python $TESTDIR/dummyssh" local ssh://user@dummy/remote1
   searching for changes
   remote: adding changesets
   remote: adding manifests
@@ -109,14 +88,14 @@
 
 init to existing repo
 
-  $ hg init -e "python ./dummyssh" ssh://user@dummy/remote1
+  $ hg init -e "python $TESTDIR/dummyssh" ssh://user@dummy/remote1
   abort: repository remote1 already exists!
   abort: could not create remote repo!
   [255]
 
 clone to existing repo
 
-  $ hg clone -e "python ./dummyssh" local ssh://user@dummy/remote1
+  $ hg clone -e "python $TESTDIR/dummyssh" local ssh://user@dummy/remote1
   abort: repository remote1 already exists!
   abort: could not create remote repo!
   [255]
@@ -205,7 +184,7 @@
   $ hg -R local bookmark test
   $ hg -R local bookmarks
    * test                      0:08b9e9f63b32
-  $ hg clone -e "python ./dummyssh" local ssh://user@dummy/remote-bookmarks
+  $ hg clone -e "python $TESTDIR/dummyssh" local ssh://user@dummy/remote-bookmarks
   searching for changes
   remote: adding changesets
   remote: adding manifests