[PATCH] tests: make test-verify-repo-operations.py not run by default

Martin von Zweigbergk martinvonz at google.com
Fri Mar 11 14:45:33 EST 2016


# HG changeset patch
# User Martin von Zweigbergk <martinvonz at google.com>
# Date 1457725443 28800
#      Fri Mar 11 11:44:03 2016 -0800
# Node ID fa2b4ce8357d04c9b1dd2edcafefc0c0d1cf7939
# Parent  63212d155b9ce57eb64fe24635b781a106714ed6
tests: make test-verify-repo-operations.py not run by default

test-verify-repo-operations.py currently starts way too late and
extends the running time with -j50 on my machine from around 3:48 min
to 6:30 min. We could of course make it run earlier, but the test case
seems unlikely to find bugs not covered by other tests, so let's mark
it "slow" instead. I think this type of test is better suited to
running separately in a long-running job.

diff -r 63212d155b9c -r fa2b4ce8357d tests/test-verify-repo-operations.py
--- a/tests/test-verify-repo-operations.py	Fri Mar 11 11:51:22 2016 -0500
+++ b/tests/test-verify-repo-operations.py	Fri Mar 11 11:44:03 2016 -0800
@@ -7,8 +7,14 @@
 unexpected errors and to compare different versions of it."""
 
 import os
+import subprocess
 import sys
 
+# Only run if slow tests are allowed
+if subprocess.call(['python', '%s/hghave' % os.environ['TESTDIR'],
+                    'slow']):
+    sys.exit(80)
+
 # These tests require Hypothesis and pytz to be installed.
 # Running 'pip install hypothesis pytz' will achieve that.
 # Note: This won't work if you're running Python < 2.7.


More information about the Mercurial-devel mailing list