tests/run-tests.py
branchstable
changeset 951 0af8a73dfe14
parent 947 23f0eeb598b5
child 955 85e0c572897f
equal deleted inserted replaced
949:dd81191ffac3 951:0af8a73dfe14
   180     if options.with_hg:
   180     if options.with_hg:
   181         if not (os.path.isfile(options.with_hg) and
   181         if not (os.path.isfile(options.with_hg) and
   182                 os.access(options.with_hg, os.X_OK)):
   182                 os.access(options.with_hg, os.X_OK)):
   183             parser.error('--with-hg must specify an executable hg script')
   183             parser.error('--with-hg must specify an executable hg script')
   184         if not os.path.basename(options.with_hg) == 'hg':
   184         if not os.path.basename(options.with_hg) == 'hg':
   185             sys.stderr.write('warning: --with-hg should specify an hg script')
   185             sys.stderr.write('warning: --with-hg should specify an hg script\n')
   186     if options.local:
   186     if options.local:
   187         testdir = os.path.dirname(os.path.realpath(sys.argv[0]))
   187         testdir = os.path.dirname(os.path.realpath(sys.argv[0]))
   188         hgbin = os.path.join(os.path.dirname(testdir), 'hg')
   188         hgbin = os.path.join(os.path.dirname(testdir), 'hg')
   189         if not os.access(hgbin, os.X_OK):
   189         if not os.access(hgbin, os.X_OK):
   190             parser.error('--local specified, but %r not found or not executable'
   190             parser.error('--local specified, but %r not found or not executable'
   239             sys.stderr.write(
   239             sys.stderr.write(
   240                 'warning: --timeout option ignored with --debug\n')
   240                 'warning: --timeout option ignored with --debug\n')
   241         options.timeout = 0
   241         options.timeout = 0
   242     if options.timeout and not hasattr(subprocess.Popen, 'terminate'):
   242     if options.timeout and not hasattr(subprocess.Popen, 'terminate'):
   243         sys.stderr.write('warning: timeout is not supported on this '
   243         sys.stderr.write('warning: timeout is not supported on this '
   244                          'platform and will be ignored')
   244                          'platform and will be ignored\n')
   245         options.timeout = 0
   245         options.timeout = 0
   246     if options.py3k_warnings:
   246     if options.py3k_warnings:
   247         if sys.version_info[:2] < (2, 6) or sys.version_info[:2] >= (3, 0):
   247         if sys.version_info[:2] < (2, 6) or sys.version_info[:2] >= (3, 0):
   248             parser.error('--py3k-warnings can only be used on Python 2.6+')
   248             parser.error('--py3k-warnings can only be used on Python 2.6+')
   249     if options.blacklist:
   249     if options.blacklist: