tests/run-tests.py
branchstable
changeset 1364 772a53435e14
parent 1363 58a33a3ed565
child 1365 51476d2dcab1
equal deleted inserted replaced
1363:58a33a3ed565 1364:772a53435e14
  1226         tmpdir = options.tmpdir
  1226         tmpdir = options.tmpdir
  1227         if os.path.exists(tmpdir):
  1227         if os.path.exists(tmpdir):
  1228             # Meaning of tmpdir has changed since 1.3: we used to create
  1228             # Meaning of tmpdir has changed since 1.3: we used to create
  1229             # HGTMP inside tmpdir; now HGTMP is tmpdir.  So fail if
  1229             # HGTMP inside tmpdir; now HGTMP is tmpdir.  So fail if
  1230             # tmpdir already exists.
  1230             # tmpdir already exists.
  1231             sys.exit("error: temp dir %r already exists" % tmpdir)
  1231             print "error: temp dir %r already exists" % tmpdir
       
  1232             return 1
  1232 
  1233 
  1233             # Automatically removing tmpdir sounds convenient, but could
  1234             # Automatically removing tmpdir sounds convenient, but could
  1234             # really annoy anyone in the habit of using "--tmpdir=/tmp"
  1235             # really annoy anyone in the habit of using "--tmpdir=/tmp"
  1235             # or "--tmpdir=$HOME".
  1236             # or "--tmpdir=$HOME".
  1236             #vlog("# Removing temp dir", tmpdir)
  1237             #vlog("# Removing temp dir", tmpdir)
  1291     vlog("# Using HGTMP", HGTMP)
  1292     vlog("# Using HGTMP", HGTMP)
  1292     vlog("# Using PATH", os.environ["PATH"])
  1293     vlog("# Using PATH", os.environ["PATH"])
  1293     vlog("# Using", IMPL_PATH, os.environ[IMPL_PATH])
  1294     vlog("# Using", IMPL_PATH, os.environ[IMPL_PATH])
  1294 
  1295 
  1295     try:
  1296     try:
  1296         sys.exit(runtests(options, tests) or 0)
  1297         return runtests(options, tests) or 0
  1297     finally:
  1298     finally:
  1298         time.sleep(.1)
  1299         time.sleep(.1)
  1299         cleanup(options)
  1300         cleanup(options)
  1300 
  1301 
  1301 if __name__ == '__main__':
  1302 if __name__ == '__main__':
  1302     main(sys.argv[1:])
  1303     sys.exit(main(sys.argv[1:]))