# HG changeset patch # User Yuya Nishihara # Date 2015-07-19 06:27:28 # Node ID 1619563959b3eff829da979f8fb5d96144c78ba5 # Parent f8aead51aec0e0584722f2814040599dc4f6c286 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. diff --git a/tests/hghave.py b/tests/hghave.py --- a/tests/hghave.py +++ b/tests/hghave.py @@ -376,3 +376,7 @@ def has_absimport(): @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" diff --git a/tests/test-parseindex.t b/tests/test-parseindex.t --- a/tests/test-parseindex.t +++ b/tests/test-parseindex.t @@ -62,6 +62,8 @@ We approximate that by reducing the read Test corrupted p1/p2 fields that could cause SEGV at parsers.c: +#if no-pure + $ mkdir invalidparent $ cd invalidparent @@ -118,3 +120,5 @@ Test corrupted p1/p2 fields that could c find_deepest: parent out of range $ cd .. + +#endif