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
+++ b/tests/run-tests
@@ -40,6 +40,7 @@ HGTMP="${TMPDIR-/tmp}/hgtests.$RANDOM.$R
 }
 
 TESTDIR="$PWD"
+export TESTDIR
 INST="$HGTMP/install"
 PYTHONDIR="$INST/lib/python"
 cd ..
@@ -100,7 +101,7 @@ run_one() {
 
 # 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
+++ b/tests/test-archive
@@ -36,3 +36,4 @@ http_proxy= python getarchive.py "$TIP" 
 unzip -t archive.zip | sed "s/$QTIP/TIP/"
 
 kill $!
+sleep 1 # wait for server to scream and die
--- a/tests/test-copy
+++ b/tests/test-copy
@@ -22,9 +22,9 @@ hg debugindex .hg/data/b.i
 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
+++ b/tests/test-flags
@@ -30,5 +30,5 @@ hg history
 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
+++ b/tests/test-static-http
@@ -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
+++ b/tests/test-static-http.out
@@ -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