tests/run-tests.py
branchstable
changeset 935 60045f152c3b
parent 934 cf241f12e977
child 936 7a8ae4eb18bf
equal deleted inserted replaced
934:cf241f12e977 935:60045f152c3b
   715         result('p', test)
   715         result('p', test)
   716 
   716 
   717     def ignore(msg):
   717     def ignore(msg):
   718         result('i', (test, msg))
   718         result('i', (test, msg))
   719 
   719 
   720     if (test.startswith("test-") and '~' not in test and
   720     if (os.path.basename(test).startswith("test-") and '~' not in test and
   721         ('.' not in test or test.endswith('.py') or
   721         ('.' not in test or test.endswith('.py') or
   722          test.endswith('.bat') or test.endswith('.t'))):
   722          test.endswith('.bat') or test.endswith('.t'))):
   723         if not os.path.exists(test):
   723         if not os.path.exists(test):
   724             skip("doesn't exist")
   724             skip("doesn't exist")
   725             return None
   725             return None
   794             return skip("not executable")
   794             return skip("not executable")
   795         runner = shtest
   795         runner = shtest
   796 
   796 
   797     # Make a tmp subdirectory to work in
   797     # Make a tmp subdirectory to work in
   798     testtmp = os.environ["TESTTMP"] = os.environ["HOME"] = \
   798     testtmp = os.environ["TESTTMP"] = os.environ["HOME"] = \
   799         os.path.join(HGTMP, test)
   799         os.path.join(HGTMP, os.path.basename(test))
   800 
   800 
   801     os.mkdir(testtmp)
   801     os.mkdir(testtmp)
   802     ret, out = runner(testpath, testtmp, options, [
   802     ret, out = runner(testpath, testtmp, options, [
   803         (re.escape(testtmp), '$TESTTMP'),
   803         (re.escape(testtmp), '$TESTTMP'),
   804         (r':%s\b' % options.port, ':$HGPORT'),
   804         (r':%s\b' % options.port, ':$HGPORT'),