From 5091a4ba9d4aa98811fbf8177472046c5ec60d2e Mon Sep 17 00:00:00 2001 From: Mickey Rose Date: Wed, 11 Jul 2018 15:43:22 +0200 Subject: [PATCH] benchmarks: move sources under benchmarks/src/ --- benchmark/build.py | 34 ++++--------------- benchmark/{ => src}/test_array_allocation.cpp | 0 benchmark/{ => src}/test_expression_parse.cpp | 0 .../{ => src}/test_face_ptr_creation.cpp | 0 .../{ => src}/test_font_registration.cpp | 0 benchmark/{ => src}/test_getline.cpp | 0 benchmark/{ => src}/test_marker_cache.cpp | 0 benchmark/{ => src}/test_noop_rendering.cpp | 0 .../test_numeric_cast_vs_static_cast.cpp | 0 benchmark/{ => src}/test_offset_converter.cpp | 0 benchmark/{ => src}/test_png_encoding1.cpp | 0 benchmark/{ => src}/test_png_encoding2.cpp | 0 benchmark/{ => src}/test_polygon_clipping.cpp | 0 .../test_polygon_clipping_rendering.cpp | 0 benchmark/{ => src}/test_proj_transform1.cpp | 0 benchmark/{ => src}/test_quad_tree.cpp | 0 benchmark/{ => src}/test_rendering.cpp | 0 .../{ => src}/test_rendering_shared_map.cpp | 0 benchmark/{ => src}/test_to_bool.cpp | 0 benchmark/{ => src}/test_to_double.cpp | 0 benchmark/{ => src}/test_to_int.cpp | 0 benchmark/{ => src}/test_to_string1.cpp | 0 benchmark/{ => src}/test_to_string2.cpp | 0 benchmark/{ => src}/test_utf_encoding.cpp | 0 24 files changed, 6 insertions(+), 28 deletions(-) rename benchmark/{ => src}/test_array_allocation.cpp (100%) rename benchmark/{ => src}/test_expression_parse.cpp (100%) rename benchmark/{ => src}/test_face_ptr_creation.cpp (100%) rename benchmark/{ => src}/test_font_registration.cpp (100%) rename benchmark/{ => src}/test_getline.cpp (100%) rename benchmark/{ => src}/test_marker_cache.cpp (100%) rename benchmark/{ => src}/test_noop_rendering.cpp (100%) rename benchmark/{ => src}/test_numeric_cast_vs_static_cast.cpp (100%) rename benchmark/{ => src}/test_offset_converter.cpp (100%) rename benchmark/{ => src}/test_png_encoding1.cpp (100%) rename benchmark/{ => src}/test_png_encoding2.cpp (100%) rename benchmark/{ => src}/test_polygon_clipping.cpp (100%) rename benchmark/{ => src}/test_polygon_clipping_rendering.cpp (100%) rename benchmark/{ => src}/test_proj_transform1.cpp (100%) rename benchmark/{ => src}/test_quad_tree.cpp (100%) rename benchmark/{ => src}/test_rendering.cpp (100%) rename benchmark/{ => src}/test_rendering_shared_map.cpp (100%) rename benchmark/{ => src}/test_to_bool.cpp (100%) rename benchmark/{ => src}/test_to_double.cpp (100%) rename benchmark/{ => src}/test_to_int.cpp (100%) rename benchmark/{ => src}/test_to_string1.cpp (100%) rename benchmark/{ => src}/test_to_string2.cpp (100%) rename benchmark/{ => src}/test_utf_encoding.cpp (100%) diff --git a/benchmark/build.py b/benchmark/build.py index 8cfdcc7f1..b08724d8d 100644 --- a/benchmark/build.py +++ b/benchmark/build.py @@ -25,34 +25,12 @@ if env['PLATFORM'] == 'Darwin': test_env_local = test_env.Clone() -#benchmarks = glob.glob('test*cpp') -benchmarks = [ - #"test_array_allocation.cpp", - #"test_png_encoding1.cpp", - #"test_png_encoding2.cpp", - #"test_to_string1.cpp", - #"test_to_string2.cpp", - #"test_to_bool.cpp", - #"test_to_double.cpp", - #"test_to_int.cpp", - #"test_utf_encoding.cpp" - "test_polygon_clipping.cpp", - #"test_polygon_clipping_rendering.cpp", - "test_proj_transform1.cpp", - "test_expression_parse.cpp", - "test_face_ptr_creation.cpp", - "test_font_registration.cpp", - "test_rendering.cpp", - "test_rendering_shared_map.cpp", - "test_offset_converter.cpp", - "test_marker_cache.cpp", - "test_quad_tree.cpp", - "test_noop_rendering.cpp", - "test_getline.cpp", -# "test_numeric_cast_vs_static_cast.cpp", -] -for cpp_test in benchmarks: - test_program = test_env_local.Program('out/'+cpp_test.replace('.cpp',''), source=[cpp_test]) +benchmarks = glob.glob("src/*.cpp") + +for src in benchmarks: + name, ext = os.path.splitext(os.path.basename(src)) + out = os.path.join("out", name) + test_program = test_env_local.Program(out, source=[src]) if 'install' in COMMAND_LINE_TARGETS: env.Alias('install',test_program) #Depends(test_program, env.subst('../src/%s' % env['MAPNIK_LIB_NAME'])) diff --git a/benchmark/test_array_allocation.cpp b/benchmark/src/test_array_allocation.cpp similarity index 100% rename from benchmark/test_array_allocation.cpp rename to benchmark/src/test_array_allocation.cpp diff --git a/benchmark/test_expression_parse.cpp b/benchmark/src/test_expression_parse.cpp similarity index 100% rename from benchmark/test_expression_parse.cpp rename to benchmark/src/test_expression_parse.cpp diff --git a/benchmark/test_face_ptr_creation.cpp b/benchmark/src/test_face_ptr_creation.cpp similarity index 100% rename from benchmark/test_face_ptr_creation.cpp rename to benchmark/src/test_face_ptr_creation.cpp diff --git a/benchmark/test_font_registration.cpp b/benchmark/src/test_font_registration.cpp similarity index 100% rename from benchmark/test_font_registration.cpp rename to benchmark/src/test_font_registration.cpp diff --git a/benchmark/test_getline.cpp b/benchmark/src/test_getline.cpp similarity index 100% rename from benchmark/test_getline.cpp rename to benchmark/src/test_getline.cpp diff --git a/benchmark/test_marker_cache.cpp b/benchmark/src/test_marker_cache.cpp similarity index 100% rename from benchmark/test_marker_cache.cpp rename to benchmark/src/test_marker_cache.cpp diff --git a/benchmark/test_noop_rendering.cpp b/benchmark/src/test_noop_rendering.cpp similarity index 100% rename from benchmark/test_noop_rendering.cpp rename to benchmark/src/test_noop_rendering.cpp diff --git a/benchmark/test_numeric_cast_vs_static_cast.cpp b/benchmark/src/test_numeric_cast_vs_static_cast.cpp similarity index 100% rename from benchmark/test_numeric_cast_vs_static_cast.cpp rename to benchmark/src/test_numeric_cast_vs_static_cast.cpp diff --git a/benchmark/test_offset_converter.cpp b/benchmark/src/test_offset_converter.cpp similarity index 100% rename from benchmark/test_offset_converter.cpp rename to benchmark/src/test_offset_converter.cpp diff --git a/benchmark/test_png_encoding1.cpp b/benchmark/src/test_png_encoding1.cpp similarity index 100% rename from benchmark/test_png_encoding1.cpp rename to benchmark/src/test_png_encoding1.cpp diff --git a/benchmark/test_png_encoding2.cpp b/benchmark/src/test_png_encoding2.cpp similarity index 100% rename from benchmark/test_png_encoding2.cpp rename to benchmark/src/test_png_encoding2.cpp diff --git a/benchmark/test_polygon_clipping.cpp b/benchmark/src/test_polygon_clipping.cpp similarity index 100% rename from benchmark/test_polygon_clipping.cpp rename to benchmark/src/test_polygon_clipping.cpp diff --git a/benchmark/test_polygon_clipping_rendering.cpp b/benchmark/src/test_polygon_clipping_rendering.cpp similarity index 100% rename from benchmark/test_polygon_clipping_rendering.cpp rename to benchmark/src/test_polygon_clipping_rendering.cpp diff --git a/benchmark/test_proj_transform1.cpp b/benchmark/src/test_proj_transform1.cpp similarity index 100% rename from benchmark/test_proj_transform1.cpp rename to benchmark/src/test_proj_transform1.cpp diff --git a/benchmark/test_quad_tree.cpp b/benchmark/src/test_quad_tree.cpp similarity index 100% rename from benchmark/test_quad_tree.cpp rename to benchmark/src/test_quad_tree.cpp diff --git a/benchmark/test_rendering.cpp b/benchmark/src/test_rendering.cpp similarity index 100% rename from benchmark/test_rendering.cpp rename to benchmark/src/test_rendering.cpp diff --git a/benchmark/test_rendering_shared_map.cpp b/benchmark/src/test_rendering_shared_map.cpp similarity index 100% rename from benchmark/test_rendering_shared_map.cpp rename to benchmark/src/test_rendering_shared_map.cpp diff --git a/benchmark/test_to_bool.cpp b/benchmark/src/test_to_bool.cpp similarity index 100% rename from benchmark/test_to_bool.cpp rename to benchmark/src/test_to_bool.cpp diff --git a/benchmark/test_to_double.cpp b/benchmark/src/test_to_double.cpp similarity index 100% rename from benchmark/test_to_double.cpp rename to benchmark/src/test_to_double.cpp diff --git a/benchmark/test_to_int.cpp b/benchmark/src/test_to_int.cpp similarity index 100% rename from benchmark/test_to_int.cpp rename to benchmark/src/test_to_int.cpp diff --git a/benchmark/test_to_string1.cpp b/benchmark/src/test_to_string1.cpp similarity index 100% rename from benchmark/test_to_string1.cpp rename to benchmark/src/test_to_string1.cpp diff --git a/benchmark/test_to_string2.cpp b/benchmark/src/test_to_string2.cpp similarity index 100% rename from benchmark/test_to_string2.cpp rename to benchmark/src/test_to_string2.cpp diff --git a/benchmark/test_utf_encoding.cpp b/benchmark/src/test_utf_encoding.cpp similarity index 100% rename from benchmark/test_utf_encoding.cpp rename to benchmark/src/test_utf_encoding.cpp