changeset 1923:7d83a351a936

fix testsuite for freebsd and one timingissue
author Peter van Dijk <peter@dataloss.nl>
date Tue, 21 Feb 2006 22:23:51 +0100
parents 57de7e1a81d2
children 46fb38ef9a91
files tests/run-tests tests/test-archive tests/test-copy tests/test-flags tests/test-static-http tests/test-static-http.out
diffstat 6 files changed, 10 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests	Fri Feb 17 17:41:23 2006 -0600
+++ b/tests/run-tests	Tue Feb 21 22:23:51 2006 +0100
@@ -40,6 +40,7 @@
 }
 
 TESTDIR="$PWD"
+export TESTDIR
 INST="$HGTMP/install"
 PYTHONDIR="$INST/lib/python"
 cd ..
@@ -100,7 +101,7 @@
 
 # list of prerequisite programs
 # stuff from coreutils (cat, rm, etc) are not tested
-prereqs="python merge diff grep unzip md5sum gunzip sed"
+prereqs="python merge diff grep unzip gunzip sed"
 missing=''
 for pre in $prereqs ; do
     if type $pre > /dev/null 2>&1 ; then
--- a/tests/test-archive	Fri Feb 17 17:41:23 2006 -0600
+++ b/tests/test-archive	Tue Feb 21 22:23:51 2006 +0100
@@ -36,3 +36,4 @@
 unzip -t archive.zip | sed "s/$QTIP/TIP/"
 
 kill $!
+sleep 1 # wait for server to scream and die
--- a/tests/test-copy	Fri Feb 17 17:41:23 2006 -0600
+++ b/tests/test-copy	Tue Feb 21 22:23:51 2006 +0100
@@ -22,9 +22,9 @@
 echo "this should show the rename information in the metadata"
 hg debugdata .hg/data/b.d 0 | head -n 3 | tail -n 2
 
-md5sum .hg/data/b.d
+$TESTDIR/md5sum.py .hg/data/b.d
 hg cat b > bsum
-md5sum bsum
+$TESTDIR/md5sum.py bsum
 hg cat a > asum
-md5sum asum
+$TESTDIR/md5sum.py asum
 hg verify
--- a/tests/test-flags	Fri Feb 17 17:41:23 2006 -0600
+++ b/tests/test-flags	Tue Feb 21 22:23:51 2006 +0100
@@ -30,5 +30,5 @@
 hg -v co -m
 
 ls -l ../test[12]/a > foo
-cut -b 0-10 < foo
+cut -b 1-10 < foo
 
--- a/tests/test-static-http	Fri Feb 17 17:41:23 2006 -0600
+++ b/tests/test-static-http	Tue Feb 21 22:23:51 2006 +0100
@@ -1,7 +1,8 @@
 #!/bin/sh
 
-http_proxy= hg clone old-http://localhost:20059/ copy
+http_proxy= hg clone old-http://localhost:20059/ copy > clonefail.out 2>&1
 echo $?
+sed 's/[0-9]//g' < clonefail.out
 ls copy
 
 # This server doesn't do range requests so it's basically only good for
--- a/tests/test-static-http.out	Fri Feb 17 17:41:23 2006 -0600
+++ b/tests/test-static-http.out	Tue Feb 21 22:23:51 2006 +0100
@@ -1,5 +1,5 @@
-abort: <urlopen error (111, 'Connection refused')>
 255
+abort: <urlopen error (, 'Connection refused')>
 ls: copy: No such file or directory
 changeset:   0:61c9426e69fe
 tag:         tip