tests/run-tests.py
branchstable
changeset 956 e39ab51937a2
parent 955 85e0c572897f
child 960 d1f0b4802c19
equal deleted inserted replaced
955:85e0c572897f 956:e39ab51937a2
   917         installhg(options)
   917         installhg(options)
   918         _checkhglib("Testing")
   918         _checkhglib("Testing")
   919 
   919 
   920     optcopy = dict(options.__dict__)
   920     optcopy = dict(options.__dict__)
   921     optcopy['jobs'] = 1
   921     optcopy['jobs'] = 1
       
   922 
       
   923     blacklist = optcopy['blacklist'] or []
   922     del optcopy['blacklist']
   924     del optcopy['blacklist']
       
   925     blacklisted = []
       
   926 
   923     if optcopy['with_hg'] is None:
   927     if optcopy['with_hg'] is None:
   924         optcopy['with_hg'] = os.path.join(BINDIR, "hg")
   928         optcopy['with_hg'] = os.path.join(BINDIR, "hg")
   925     optcopy.pop('anycoverage', None)
   929     optcopy.pop('anycoverage', None)
   926 
   930 
   927     opts = []
   931     opts = []
   939     jobs = [[] for j in xrange(options.jobs)]
   943     jobs = [[] for j in xrange(options.jobs)]
   940     while tests:
   944     while tests:
   941         for job in jobs:
   945         for job in jobs:
   942             if not tests:
   946             if not tests:
   943                 break
   947                 break
   944             job.append(tests.pop())
   948             test = tests.pop()
       
   949             if test in blacklist:
       
   950                 blacklisted.append(test)
       
   951             else:
       
   952                 job.append(test)
   945     fps = {}
   953     fps = {}
   946 
   954 
   947     for j, job in enumerate(jobs):
   955     for j, job in enumerate(jobs):
   948         if not job:
   956         if not job:
   949             continue
   957             continue
   977         skipped += skip
   985         skipped += skip
   978         failed += fail
   986         failed += fail
   979         vlog('pid %d exited, status %d' % (pid, status))
   987         vlog('pid %d exited, status %d' % (pid, status))
   980         failures |= status
   988         failures |= status
   981     print
   989     print
       
   990     skipped += len(blacklisted)
   982     if not options.noskips:
   991     if not options.noskips:
   983         for s in skips:
   992         for s in skips:
   984             print "Skipped %s: %s" % (s[0], s[1])
   993             print "Skipped %s: %s" % (s[0], s[1])
       
   994         for s in blacklisted:
       
   995             print "Skipped %s: blacklisted" % s
   985     for s in fails:
   996     for s in fails:
   986         print "Failed %s: %s" % (s[0], s[1])
   997         print "Failed %s: %s" % (s[0], s[1])
   987 
   998 
   988     _checkhglib("Tested")
   999     _checkhglib("Tested")
   989     print "# Ran %d tests, %d skipped, %d failed." % (
  1000     print "# Ran %d tests, %d skipped, %d failed." % (