[PATCH] tests: AIX can't handle negative date in test-dirstate.t

Jim Hague jim.hague at acm.org
Tue Apr 30 11:34:23 CDT 2013


# HG changeset patch
# User Jim Hague <jim.hague at acm.org>
# Date 1367330193 -3600
# Branch stable
# Node ID 8c560ad1cdc40b2a9fd7617200daa9b7120f06a6
# Parent  f01a351db79106ba96ac6d527cf69944fd98e665
tests: AIX can't handle negative date in test-dirstate.t

test-dirstate.t fails on AIX in the absurd date test. AIX touch errors on
any date prior to 1970. AIX mktime() gives an error on such dates, so the
problem is deeper than touch and attempts to work around touch in Python
failed.

Give up. Add an AIX test to hghave and skip the absurd date test on AIX.

diff -r f01a351db791 -r 8c560ad1cdc4 tests/hghave.py
--- a/tests/hghave.py	Fri Apr 26 01:12:03 2013 +0900
+++ b/tests/hghave.py	Tue Apr 30 14:56:33 2013 +0100
@@ -274,6 +274,9 @@
 def has_msys():
     return os.getenv('MSYSTEM')
 
+def has_aix():
+    return sys.platform.startswith("aix")
+
 checks = {
     "true": (lambda: True, "yak shaving"),
     "false": (lambda: False, "nail clipper"),
@@ -314,4 +317,5 @@
     "unix-permissions": (has_unix_permissions, "unix-style permissions"),
     "windows": (has_windows, "Windows"),
     "msys": (has_msys, "Windows with MSYS"),
+    "aix": (has_aix, "AIX"),
 }
diff -r f01a351db791 -r 8c560ad1cdc4 tests/test-dirstate.t
--- a/tests/test-dirstate.t	Fri Apr 26 01:12:03 2013 +0900
+++ b/tests/test-dirstate.t	Tue Apr 30 14:56:33 2013 +0100
@@ -55,8 +55,9 @@
 
 Test modulo storage/comparison of absurd dates:
 
+#if no-aix
   $ touch -t 195001011200 a
   $ hg st
   $ hg debugstate
   n 644          2 2018-01-19 15:14:08 a
-
+#endif


More information about the Mercurial-devel mailing list