Use skipped: instead of hghave: for skipping tests, use this in test-merge-types
authorThomas Arendsen Hein <thomas@intevation.de>
Fri, 21 Dec 2007 21:50:19 +0100
changeset 5685 57d29a45ffbc
parent 5684 c08cda4e4ddd
child 5686 5d14d71148b8
Use skipped: instead of hghave: for skipping tests, use this in test-merge-types
tests/hghave
tests/run-tests.py
tests/test-convert-darcs
tests/test-merge-types
--- a/tests/hghave	Fri Dec 21 12:14:35 2007 +0100
+++ b/tests/hghave	Fri Dec 21 21:50:19 2007 +0100
@@ -133,14 +133,14 @@
             feature = feature[3:]
 
         if feature not in checks:
-            error('hghave: unknown feature: ' + feature)
+            error('skipped: unknown feature: ' + feature)
             continue
 
         check, desc = checks[feature]
         if not negate and not check():
-            error('hghave: missing feature: ' + desc)
+            error('skipped: missing feature: ' + desc)
         elif negate and check():
-            error('hghave: system supports %s' % desc)
+            error('skipped: system supports %s' % desc)
 
     if failures != 0:
         sys.exit(1)
--- a/tests/run-tests.py	Fri Dec 21 12:14:35 2007 +0100
+++ b/tests/run-tests.py	Fri Dec 21 21:50:19 2007 +0100
@@ -19,8 +19,9 @@
 import tempfile
 import time
 
-# hghave reserved exit code to skip test
+# reserved exit code to skip test (used by hghave)
 SKIPPED_STATUS = 80
+SKIPPED_PREFIX = 'skipped: '
 
 required_tools = ["python", "diff", "grep", "unzip", "gunzip", "bunzip2", "sed"]
 
@@ -92,10 +93,10 @@
     '''Extract missing/unknown features log lines as a list'''
     missing = []
     for line in lines:
-        if not line.startswith('hghave: '):
+        if not line.startswith(SKIPPED_PREFIX):
             continue
         line = line.splitlines()[0]
-        missing.append(line[8:])
+        missing.append(line[len(SKIPPED_PREFIX):])
 
     return missing
 
--- a/tests/test-convert-darcs	Fri Dec 21 12:14:35 2007 +0100
+++ b/tests/test-convert-darcs	Fri Dec 21 21:50:19 2007 +0100
@@ -13,7 +13,7 @@
 mkdir dummy
 mkdir dummy/_darcs
 if hg convert dummy 2>&1 | grep ElementTree > /dev/null; then
-    echo 'hghave: missing feature: elementtree module'
+    echo 'skipped: missing feature: elementtree module'
     exit 80
 fi
 
--- a/tests/test-merge-types	Fri Dec 21 12:14:35 2007 +0100
+++ b/tests/test-merge-types	Fri Dec 21 21:50:19 2007 +0100
@@ -34,3 +34,6 @@
 elif [ -x a ]; then
     echo a is executable
 fi
+
+echo "skipped: test is for a known, unfixed bug"
+exit 80