tests/run-tests.py
branchstable
changeset 1016 b4ca7adb4bf1
parent 1015 0a583943b4b4
child 1017 9cd561108da4
equal deleted inserted replaced
1015:0a583943b4b4 1016:b4ca7adb4bf1
    85 
    85 
    86 # reserved exit code to skip test (used by hghave)
    86 # reserved exit code to skip test (used by hghave)
    87 SKIPPED_STATUS = 80
    87 SKIPPED_STATUS = 80
    88 SKIPPED_PREFIX = 'skipped: '
    88 SKIPPED_PREFIX = 'skipped: '
    89 FAILED_PREFIX  = 'hghave check failed: '
    89 FAILED_PREFIX  = 'hghave check failed: '
    90 PYTHON = sys.executable
    90 PYTHON = sys.executable.replace('\\', '/')
    91 IMPL_PATH = 'PYTHONPATH'
    91 IMPL_PATH = 'PYTHONPATH'
    92 if 'java' in sys.platform:
    92 if 'java' in sys.platform:
    93     IMPL_PATH = 'JYTHONPATH'
    93     IMPL_PATH = 'JYTHONPATH'
    94 
    94 
    95 requiredtools = ["python", "diff", "grep", "unzip", "gunzip", "bunzip2", "sed"]
    95 requiredtools = ["python", "diff", "grep", "unzip", "gunzip", "bunzip2", "sed"]
   863             return skip("not executable")
   863             return skip("not executable")
   864         runner = shtest
   864         runner = shtest
   865 
   865 
   866     # Make a tmp subdirectory to work in
   866     # Make a tmp subdirectory to work in
   867     testtmp = os.environ["TESTTMP"] = os.environ["HOME"] = \
   867     testtmp = os.environ["TESTTMP"] = os.environ["HOME"] = \
   868         os.path.join(HGTMP, os.path.basename(test))
   868         os.path.join(HGTMP, os.path.basename(test)).replace('\\', '/')
   869 
   869 
   870     os.mkdir(testtmp)
   870     os.mkdir(testtmp)
   871     ret, out = runner(testpath, testtmp, options, [
   871     ret, out = runner(testpath, testtmp, options, [
   872         (re.escape(testtmp), '$TESTTMP'),
   872         (re.escape(testtmp), '$TESTTMP'),
   873         (r':%s\b' % options.port, ':$HGPORT'),
   873         (r':%s\b' % options.port, ':$HGPORT'),