tests/run-tests.py
branchstable
changeset 1261 13890d7a70b1
parent 1260 d9ebd2545572
child 1263 f31eefe0ab4c
equal deleted inserted replaced
1260:d9ebd2545572 1261:13890d7a70b1
   157         help="keep temporary directory after running tests")
   157         help="keep temporary directory after running tests")
   158     parser.add_option("-k", "--keywords",
   158     parser.add_option("-k", "--keywords",
   159         help="run tests matching keywords")
   159         help="run tests matching keywords")
   160     parser.add_option("-l", "--local", action="store_true",
   160     parser.add_option("-l", "--local", action="store_true",
   161         help="shortcut for --with-hg=<testdir>/../hg")
   161         help="shortcut for --with-hg=<testdir>/../hg")
       
   162     parser.add_option("--loop", action="store_true",
       
   163         help="loop tests repeatedly")
   162     parser.add_option("-n", "--nodiff", action="store_true",
   164     parser.add_option("-n", "--nodiff", action="store_true",
   163         help="skip showing test changes")
   165         help="skip showing test changes")
   164     parser.add_option("-p", "--port", type="int",
   166     parser.add_option("-p", "--port", type="int",
   165         help="port on which servers should listen"
   167         help="port on which servers should listen"
   166              " (default: $%s or %d)" % defaults['port'])
   168              " (default: $%s or %d)" % defaults['port'])
  1086                 except queue.Empty:
  1088                 except queue.Empty:
  1087                     continue
  1089                     continue
  1088                 running -= 1
  1090                 running -= 1
  1089             if tests and not running == jobs:
  1091             if tests and not running == jobs:
  1090                 test = tests.pop(0)
  1092                 test = tests.pop(0)
       
  1093                 if options.loop:
       
  1094                     tests.append(test)
  1091                 t = threading.Thread(None, job, args=(test, count))
  1095                 t = threading.Thread(None, job, args=(test, count))
  1092                 t.start()
  1096                 t.start()
  1093                 running += 1
  1097                 running += 1
  1094                 count += 1
  1098                 count += 1
  1095     except KeyboardInterrupt:
  1099     except KeyboardInterrupt: