ci.py: run daca2 in alphabetical order again

This commit is contained in:
Daniel Marjamäki 2014-06-28 20:11:46 +02:00
parent 41baffdda1
commit 1bcb22e4a4
1 changed files with 6 additions and 24 deletions

View File

@ -131,30 +131,10 @@ def daca2report():
subprocess.call(['python', 'tools/daca2-report.py', 'daca2-report'])
upload('-r daca2-report', 'htdocs/devinfo/')
def daca2(foldernum):
folders = '0123456789abcdefghijklmnopqrstuvwxyz'
folder = folders[foldernum % len(folders)]
def daca2folder():
oldresults = glob.glob(os.path.expanduser('~/daca2/*/results.txt'))
oldestfolder = None
oldestdate = None
for old in oldresults:
f = open(old, 'rt')
filedata = f.read()
f.close()
pos = filedata.find('STARTDATE')
if pos < 0:
pos = old.find('/daca2/')
return old[pos + 7:old.find('/', pos + 8)]
startdate = filedata[pos + 10:pos + 20]
if not oldestdate or oldestdate > startdate:
oldestdate = startdate
pos = old.find('/daca2/')
oldestfolder = old[pos + 7:old.find('/', pos + 8)]
return oldestfolder
def daca2():
folder = daca2folder()
print('Daca2 folder=' + folder)
p = subprocess.Popen(['git', 'show', '--format=%h'],
@ -177,6 +157,7 @@ def daca2():
daca2report()
t0 = datetime.date.today()
foldernum = 0
while True:
if datetime.date.today() != t0:
print("generate daily reports")
@ -191,4 +172,5 @@ while True:
if cmd.find("doxygen") >= 0:
generate_webreport()
daca2()
daca2(foldernum)
foldernum = foldernum + 1