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>'
|
if subtle: ret += '</span>'
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
def modification_time(file):
|
||||||
|
mtime = 0
|
||||||
|
try:
|
||||||
|
mtime = os.stat(file).st_mtime
|
||||||
|
except: pass
|
||||||
|
return mtime
|
||||||
|
|
||||||
|
|
||||||
project_name = ''
|
project_name = ''
|
||||||
|
|
||||||
|
@ -74,17 +81,12 @@ if 'project' in cfg:
|
||||||
|
|
||||||
branch_name = 'trunk'
|
branch_name = 'trunk'
|
||||||
if 'branch' in cfg:
|
if 'branch' in cfg:
|
||||||
branch_name = cfg['branch']
|
branch_name = cfg['branch'].strip()
|
||||||
|
|
||||||
|
print 'branch: %s' % branch_name
|
||||||
|
|
||||||
os.chdir('regression_tests')
|
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')
|
index_mtime = modification_time('index.html')
|
||||||
|
|
||||||
latest_rev = 0
|
latest_rev = 0
|
||||||
|
@ -92,7 +94,7 @@ latest_rev = 0
|
||||||
|
|
||||||
for rev in os.listdir('.'):
|
for rev in os.listdir('.'):
|
||||||
try:
|
try:
|
||||||
if not rev.startswith('%s-', branch_name): continue
|
if not rev.startswith('%s-' % branch_name): continue
|
||||||
r = int(rev[len(branch_name)+1:])
|
r = int(rev[len(branch_name)+1:])
|
||||||
if r > latest_rev: latest_rev = r
|
if r > latest_rev: latest_rev = r
|
||||||
except: pass
|
except: pass
|
||||||
|
@ -101,6 +103,8 @@ if latest_rev == 0:
|
||||||
print 'no test files found'
|
print 'no test files found'
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
print 'latest version: %d' % latest_rev
|
||||||
|
|
||||||
rev_dir = '%s-%d' % (branch_name, latest_rev)
|
rev_dir = '%s-%d' % (branch_name, latest_rev)
|
||||||
|
|
||||||
need_refresh = False
|
need_refresh = False
|
||||||
|
|
Loading…
Reference in New Issue