##// END OF EJS Templates
run-tests.py: skipped tests shouldn't change working directory
Mads Kiilerich -
r10406:6586a688 default
parent child Browse files
Show More
@@ -522,18 +522,11 b' def runone(options, test, skips, fails):'
522 hgrc.write('appendpid=True\n')
522 hgrc.write('appendpid=True\n')
523 hgrc.close()
523 hgrc.close()
524
524
525 err = os.path.join(TESTDIR, test+".err")
525 testpath = os.path.join(TESTDIR, test)
526 ref = os.path.join(TESTDIR, test+".out")
526 ref = os.path.join(TESTDIR, test+".out")
527 testpath = os.path.join(TESTDIR, test)
527 err = os.path.join(TESTDIR, test+".err")
528
529 if os.path.exists(err):
528 if os.path.exists(err):
530 os.remove(err) # Remove any previous output files
529 os.remove(err) # Remove any previous output files
531
532 # Make a tmp subdirectory to work in
533 tmpd = os.path.join(HGTMP, test)
534 os.mkdir(tmpd)
535 os.chdir(tmpd)
536
537 try:
530 try:
538 tf = open(testpath)
531 tf = open(testpath)
539 firstline = tf.readline().rstrip()
532 firstline = tf.readline().rstrip()
@@ -563,6 +556,11 b' def runone(options, test, skips, fails):'
563 return skip("not executable")
556 return skip("not executable")
564 cmd = '"%s"' % testpath
557 cmd = '"%s"' % testpath
565
558
559 # Make a tmp subdirectory to work in
560 tmpd = os.path.join(HGTMP, test)
561 os.mkdir(tmpd)
562 os.chdir(tmpd)
563
566 if options.timeout > 0:
564 if options.timeout > 0:
567 signal.alarm(options.timeout)
565 signal.alarm(options.timeout)
568
566
General Comments 0
You need to be logged in to leave comments. Login now