autotest: allow for multiple html files

This commit is contained in:
Andrew Tridgell 2011-11-10 00:23:46 +11:00
parent 97e3f113b7
commit bef89a8ab5

View File

@ -194,8 +194,9 @@ def write_webresults(results):
sys.path.insert(0, os.path.join(util.reltopdir("../pymavlink/generator")))
import mavtemplate
t = mavtemplate.MAVTemplate()
html = util.loadfile(util.reltopdir('Tools/autotest/web/index.html'))
f = open(util.reltopdir("../buildlogs/index.html"), mode='w')
for h in glob.glob(util.reltopdir('Tools/autotest/web/*.html')):
html = util.loadfile(h)
f = open(util.reltopdir("../buildlogs/%s" % os.path.basename(h)), mode='w')
t.write(f, html, results)
f.close()