[Docs] Fix doc building idempotency

When running the doc building a new scenario was generated,
and appened to the scenario-table-gen.html page. We should instead
generate that page from scratch, and ensure it's always the
same content. This doesn't clean the scenario table gen, it simply
makes sure the generated content is always ordered the same way.

Change-Id: I9098f5d76b73be5ef28684027ff5039cd52d6ddb
This commit is contained in:
Jean-Philippe Evrard 2018-03-15 12:43:51 +00:00
parent 882d98c94b
commit 8c94cf57c4
2 changed files with 2 additions and 2 deletions

View File

@ -35,7 +35,7 @@ stg = imp.load_source(
'scenario_table_gen',
os.path.join(CONF_PATH, 'scenario_table_gen.py')
)
with open(TABLE_FILE, 'a+') as f:
with open(TABLE_FILE, 'w') as f:
f.write(stg.main())
# If extensions (or modules to document with autodoc) are in another directory,

View File

@ -41,7 +41,7 @@ def main():
for items in scenario_meta_data.values():
for item in items:
config_items.add(item['name'].split('.')[0])
config_items = list(config_items)
config_items = list(sorted(config_items))
for item in config_items:
HTML_TABLE += '<tr>'