tests: disable test of buffer overflow in parsers.c if --pure stable
authorYuya Nishihara <yuya@tcha.org>
Sun, 19 Jul 2015 15:27:28 +0900
branchstable
changeset 25859 1619563959b3
parent 25858 f8aead51aec0
child 25860 895f04955a49
tests: disable test of buffer overflow in parsers.c if --pure It fails with AttributeError and there's no benefit to make it runnable with pure Python code.
tests/hghave.py
tests/test-parseindex.t
--- a/tests/hghave.py	Sun Jul 19 18:11:18 2015 +0200
+++ b/tests/hghave.py	Sun Jul 19 15:27:28 2015 +0900
@@ -376,3 +376,7 @@
 @check("py3k", "running with Python 3.x")
 def has_py3k():
     return 3 == sys.version_info[0]
+
+@check("pure", "running with pure Python code")
+def has_pure():
+    return os.environ.get("HGTEST_RUN_TESTS_PURE") == "--pure"
--- a/tests/test-parseindex.t	Sun Jul 19 18:11:18 2015 +0200
+++ b/tests/test-parseindex.t	Sun Jul 19 15:27:28 2015 +0900
@@ -62,6 +62,8 @@
 
 Test corrupted p1/p2 fields that could cause SEGV at parsers.c:
 
+#if no-pure
+
   $ mkdir invalidparent
   $ cd invalidparent
 
@@ -118,3 +120,5 @@
   find_deepest: parent out of range
 
   $ cd ..
+
+#endif