##// END OF EJS Templates
tests: adapt the test runner to work with jython
Ronny Pfannschmidt -
r10758:2ed667a9 default
parent child Browse files
Show More
@@ -70,6 +70,9 b' SKIPPED_STATUS = 80'
70 SKIPPED_PREFIX = 'skipped: '
70 SKIPPED_PREFIX = 'skipped: '
71 FAILED_PREFIX = 'hghave check failed: '
71 FAILED_PREFIX = 'hghave check failed: '
72 PYTHON = sys.executable
72 PYTHON = sys.executable
73 IMPL_PATH = 'PYTHONPATH'
74 if 'java' in sys.platform:
75 IMPL_PATH = 'JYTHONPATH'
73
76
74 requiredtools = ["python", "diff", "grep", "unzip", "gunzip", "bunzip2", "sed"]
77 requiredtools = ["python", "diff", "grep", "unzip", "gunzip", "bunzip2", "sed"]
75
78
@@ -140,6 +143,9 b' def parseargs():'
140 parser.set_defaults(**defaults)
143 parser.set_defaults(**defaults)
141 (options, args) = parser.parse_args()
144 (options, args) = parser.parse_args()
142
145
146 # jython is always pure
147 options.pure = options.pure or 'java' in sys.platform
148
143 if options.with_hg:
149 if options.with_hg:
144 if not (os.path.isfile(options.with_hg) and
150 if not (os.path.isfile(options.with_hg) and
145 os.access(options.with_hg, os.X_OK)):
151 os.access(options.with_hg, os.X_OK)):
@@ -907,10 +913,10 b' def main():'
907 # it, in case external libraries are only available via current
913 # it, in case external libraries are only available via current
908 # PYTHONPATH. (In particular, the Subversion bindings on OS X
914 # PYTHONPATH. (In particular, the Subversion bindings on OS X
909 # are in /opt/subversion.)
915 # are in /opt/subversion.)
910 oldpypath = os.environ.get('PYTHONPATH')
916 oldpypath = os.environ.get(IMPL_PATH)
911 if oldpypath:
917 if oldpypath:
912 pypath.append(oldpypath)
918 pypath.append(oldpypath)
913 os.environ['PYTHONPATH'] = os.pathsep.join(pypath)
919 os.environ[IMPL_PATH] = os.pathsep.join(pypath)
914
920
915 COVERAGE_FILE = os.path.join(TESTDIR, ".coverage")
921 COVERAGE_FILE = os.path.join(TESTDIR, ".coverage")
916
922
@@ -931,7 +937,7 b' def main():'
931 vlog("# Using TESTDIR", TESTDIR)
937 vlog("# Using TESTDIR", TESTDIR)
932 vlog("# Using HGTMP", HGTMP)
938 vlog("# Using HGTMP", HGTMP)
933 vlog("# Using PATH", os.environ["PATH"])
939 vlog("# Using PATH", os.environ["PATH"])
934 vlog("# Using PYTHONPATH", os.environ["PYTHONPATH"])
940 vlog("# Using", IMPL_PATH, os.environ[IMPL_PATH])
935
941
936 try:
942 try:
937 if len(tests) > 1 and options.jobs > 1:
943 if len(tests) > 1 and options.jobs > 1:
General Comments 0
You need to be logged in to leave comments. Login now