From b04be9032670a325f0cc5ecbbb7cdcf5d9ba195d Mon Sep 17 00:00:00 2001 From: southerntofu <52931252+southerntofu@users.noreply.github.com> Date: Tue, 4 Aug 2020 10:39:09 +0000 Subject: [PATCH] Fix benchmarks (#1113) * Include test_site/static in benchmark sites * Benches can run again --- components/site/benches/gen.py | 2 +- components/site/benches/site.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/site/benches/gen.py b/components/site/benches/gen.py index 0fe649a9..469d1cea 100644 --- a/components/site/benches/gen.py +++ b/components/site/benches/gen.py @@ -98,7 +98,6 @@ def gen_skeleton(name, is_blog): shutil.rmtree(name) 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: if is_blog: @@ -128,6 +127,7 @@ name = "Vincent Prouillet" # Re-use the test 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/static", os.path.join(name, "static")) def gen_section(path, num_pages, is_blog): diff --git a/components/site/benches/site.rs b/components/site/benches/site.rs index 754eb413..c5805a49 100644 --- a/components/site/benches/site.rs +++ b/components/site/benches/site.rs @@ -46,7 +46,7 @@ fn bench_render_feed(b: &mut test::Bencher) { site.library.read().unwrap().pages_values(), None, &site.config.default_language, - None, + |c| c, ) .unwrap(); });