[PATCH] tests: Skip tests if they will fail because of outer repo
Mads Kiilerich
mads at kiilerich.com
Wed Nov 26 02:30:21 UTC 2008
# HG changeset patch
# User Mads Kiilerich <mads at kiilerich.com>
# Date 1227666539 -3600
# Node ID 45d8c6a75e8f94aeef270589516a0ca8d158564c
# Parent bbfb3bbb92144c110f0a73179cc178892730caa5
tests: Skip tests if they will fail because of outer repo
For different reasons these tests will fail if run in a tmpdir which is in a hg
repo.
diff --git a/tests/test-convert-svn-sink b/tests/test-convert-svn-sink
--- a/tests/test-convert-svn-sink
+++ b/tests/test-convert-svn-sink
@@ -2,6 +2,11 @@
"$TESTDIR/hghave" svn svn-bindings || exit 80
+if hg root 2> /dev/null; then
+ echo "skipped: can't run with outer repo in `hg root`"
+ exit 80
+fi
+
fixpath()
{
tr '\\' /
diff --git a/tests/test-dispatch b/tests/test-dispatch
--- a/tests/test-dispatch
+++ b/tests/test-dispatch
@@ -1,6 +1,11 @@
#!/bin/sh
# test command parsing and dispatch
+if hg root 2> /dev/null; then
+ echo "skipped: can't run with outer repo in `hg root`"
+ exit 80
+fi
+
hg init a
cd a
echo a > a
diff --git a/tests/test-extension b/tests/test-extension
--- a/tests/test-extension
+++ b/tests/test-extension
@@ -1,6 +1,11 @@
#!/bin/sh
# Test basic extension support
+if hg root 2> /dev/null; then
+ echo "skipped: can't run with outer repo in `hg root`"
+ exit 80
+fi
+
cat > foobar.py <<EOF
import os
from mercurial import commands
diff --git a/tests/test-globalopts b/tests/test-globalopts
--- a/tests/test-globalopts
+++ b/tests/test-globalopts
@@ -1,5 +1,10 @@
#!/bin/sh
+if hg root 2> /dev/null; then
+ echo "skipped: can't run with outer repo in `hg root`"
+ exit 80
+fi
+
hg init a
cd a
echo a > a
diff --git a/tests/test-glog b/tests/test-glog
--- a/tests/test-glog
+++ b/tests/test-glog
@@ -70,6 +70,11 @@
# |/
# o (0) root
+if hg root 2> /dev/null; then
+ echo "skipped: can't run with outer repo in `hg root`"
+ exit 80
+fi
+
set -e
commit()
More information about the Mercurial-devel
mailing list