tests/run-tests.py
branchstable
changeset 909 5ec26580cbb2
parent 908 78f81dc655ca
child 910 b8ae2e290420
equal deleted inserted replaced
908:78f81dc655ca 909:5ec26580cbb2
   932 
   932 
   933     if options.anycoverage:
   933     if options.anycoverage:
   934         outputcoverage(options)
   934         outputcoverage(options)
   935     sys.exit(failures != 0)
   935     sys.exit(failures != 0)
   936 
   936 
       
   937 def runqueue(options, tests, results):
       
   938     for test in tests:
       
   939         ret = runone(options, test, results)
       
   940         if options.first and ret is not None and not ret:
       
   941             break
       
   942 
   937 def runtests(options, tests):
   943 def runtests(options, tests):
   938     global DAEMON_PIDS, HGRCPATH
   944     global DAEMON_PIDS, HGRCPATH
   939     DAEMON_PIDS = os.environ["DAEMON_PIDS"] = os.path.join(HGTMP, 'daemon.pids')
   945     DAEMON_PIDS = os.environ["DAEMON_PIDS"] = os.path.join(HGTMP, 'daemon.pids')
   940     HGRCPATH = os.environ["HGRCPATH"] = os.path.join(HGTMP, '.hgrc')
   946     HGRCPATH = os.environ["HGRCPATH"] = os.path.join(HGTMP, '.hgrc')
   941 
   947 
   963                 tests.pop(0)
   969                 tests.pop(0)
   964             if not tests:
   970             if not tests:
   965                 print "running all tests"
   971                 print "running all tests"
   966                 tests = orig
   972                 tests = orig
   967 
   973 
   968         for test in tests:
   974         runqueue(options, tests, results)
   969             ret = runone(options, test, results)
       
   970             if options.first and ret is not None and not ret:
       
   971                 break
       
   972 
   975 
   973         failed = len(results['f'])
   976         failed = len(results['f'])
   974         tested = len(results['p']) + failed
   977         tested = len(results['p']) + failed
   975         skipped = len(results['s'])
   978         skipped = len(results['s'])
   976         ignored = len(results['i'])
   979         ignored = len(results['i'])