Fix benchmarks (#1113)
* Include test_site/static in benchmark sites * Benches can run again
This commit is contained in:
parent
39eed4fdee
commit
b04be90326
|
@ -98,7 +98,6 @@ def gen_skeleton(name, is_blog):
|
||||||
shutil.rmtree(name)
|
shutil.rmtree(name)
|
||||||
|
|
||||||
os.makedirs(os.path.join(name, "content"))
|
os.makedirs(os.path.join(name, "content"))
|
||||||
os.makedirs(os.path.join(name, "static"))
|
|
||||||
|
|
||||||
with open(os.path.join(name, "config.toml"), "w") as f:
|
with open(os.path.join(name, "config.toml"), "w") as f:
|
||||||
if is_blog:
|
if is_blog:
|
||||||
|
@ -128,6 +127,7 @@ name = "Vincent Prouillet"
|
||||||
# Re-use the test templates
|
# Re-use the test templates
|
||||||
shutil.copytree("../../../test_site/templates", os.path.join(name, "templates"))
|
shutil.copytree("../../../test_site/templates", os.path.join(name, "templates"))
|
||||||
shutil.copytree("../../../test_site/themes", os.path.join(name, "themes"))
|
shutil.copytree("../../../test_site/themes", os.path.join(name, "themes"))
|
||||||
|
shutil.copytree("../../../test_site/static", os.path.join(name, "static"))
|
||||||
|
|
||||||
|
|
||||||
def gen_section(path, num_pages, is_blog):
|
def gen_section(path, num_pages, is_blog):
|
||||||
|
|
|
@ -46,7 +46,7 @@ fn bench_render_feed(b: &mut test::Bencher) {
|
||||||
site.library.read().unwrap().pages_values(),
|
site.library.read().unwrap().pages_values(),
|
||||||
None,
|
None,
|
||||||
&site.config.default_language,
|
&site.config.default_language,
|
||||||
None,
|
|c| c,
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue