forked from premiere/premiere-libtorrent
fix test output parser
This commit is contained in:
parent
45161cb383
commit
9924f6674c
|
@ -59,6 +59,13 @@ def style_output(o):
|
|||
if subtle: ret += '</span>'
|
||||
return ret
|
||||
|
||||
def modification_time(file):
|
||||
mtime = 0
|
||||
try:
|
||||
mtime = os.stat(file).st_mtime
|
||||
except: pass
|
||||
return mtime
|
||||
|
||||
|
||||
project_name = ''
|
||||
|
||||
|
@ -74,17 +81,12 @@ if 'project' in cfg:
|
|||
|
||||
branch_name = 'trunk'
|
||||
if 'branch' in cfg:
|
||||
branch_name = cfg['branch']
|
||||
branch_name = cfg['branch'].strip()
|
||||
|
||||
print 'branch: %s' % branch_name
|
||||
|
||||
os.chdir('regression_tests')
|
||||
|
||||
def modification_time(file):
|
||||
mtime = 0
|
||||
try:
|
||||
mtime = os.stat(file).st_mtime
|
||||
except: pass
|
||||
return mtime
|
||||
|
||||
index_mtime = modification_time('index.html')
|
||||
|
||||
latest_rev = 0
|
||||
|
@ -92,7 +94,7 @@ latest_rev = 0
|
|||
|
||||
for rev in os.listdir('.'):
|
||||
try:
|
||||
if not rev.startswith('%s-', branch_name): continue
|
||||
if not rev.startswith('%s-' % branch_name): continue
|
||||
r = int(rev[len(branch_name)+1:])
|
||||
if r > latest_rev: latest_rev = r
|
||||
except: pass
|
||||
|
@ -101,6 +103,8 @@ if latest_rev == 0:
|
|||
print 'no test files found'
|
||||
sys.exit(1)
|
||||
|
||||
print 'latest version: %d' % latest_rev
|
||||
|
||||
rev_dir = '%s-%d' % (branch_name, latest_rev)
|
||||
|
||||
need_refresh = False
|
||||
|
|
Loading…
Reference in New Issue