mirror of
https://github.com/apache/arrow.git
synced 2026-10-28 16:47:19 +08:00
Rename io/ipc tests/executables. Add appropriate labels/prefixes to all unit tests/benchmarks. Add labels option to ADD_BENCHMARK
Change-Id: Id7018e6b5ffb758b5e6fcd4621c38b1e8a93567c
This commit is contained in:
1 parent
9c8ddae116
commit
1f3daaf782
32 files changed
+142
-54
No files matched your search
@@ -793,18 +793,6 @@ endif()
|
||||
|
||||
add_subdirectory(src/arrow)
|
||||
|
||||
if(ARROW_FLIGHT)
|
||||
add_subdirectory(src/arrow/flight)
|
||||
endif()
|
||||
|
||||
if(ARROW_PYTHON)
|
||||
add_subdirectory(src/arrow/python)
|
||||
endif()
|
||||
|
||||
if(ARROW_HIVESERVER2)
|
||||
add_subdirectory(src/arrow/dbi/hiveserver2)
|
||||
endif()
|
||||
|
||||
if(ARROW_PARQUET)
|
||||
add_subdirectory(src/parquet)
|
||||
add_subdirectory(tools/parquet)
|
||||
|
||||
+13
-2
@@ -82,7 +82,18 @@ environment variable (which requires the `locales` package or equivalent):
|
||||
export LC_ALL="en_US.UTF-8"
|
||||
```
|
||||
|
||||
## Building and Developing Parquet Libraries
|
||||
## Modular Build Targets
|
||||
|
||||
Since there are several major parts of the C++ project, we have provided
|
||||
modular CMake targets for building each component along with its dependencies,
|
||||
unit tests, and benchmarks (if enabled):
|
||||
|
||||
* `make arrow` for Arrow core libraries
|
||||
* `make parquet` for Parquet libraries
|
||||
* `make gandiva` for Gandiva (LLVM expression compiler) libraries
|
||||
* `make plasma` for Plasma libraries, server
|
||||
|
||||
## Parquet Development Notes
|
||||
|
||||
To build the C++ libraries for Apache Parquet, add the flag
|
||||
`-DARROW_PARQUET=ON` when invoking CMake. The Parquet libraries and unit tests
|
||||
@@ -120,7 +131,7 @@ with the `--ARROW_BUILD_BENCHMARKS` parameter set correctly:
|
||||
cmake -DARROW_BUILD_BENCHMARKS=ON ..
|
||||
|
||||
and instead of make unittest run either `make; ctest` to run both unit tests
|
||||
and benchmarks or `make runbenchmark` to run only the benchmark tests.
|
||||
and benchmarks or `make benchmark` to run only the benchmark tests.
|
||||
|
||||
Benchmark logs will be placed in the build directory under `build/benchmark-logs`.
|
||||
|
||||
|
||||
@@ -290,7 +290,7 @@ endfunction()
|
||||
############################################################
|
||||
# Add a new micro benchmark, with or without an executable that should be built.
|
||||
# If benchmarks are enabled then they will be run along side unit tests with ctest.
|
||||
# 'make runbenchmark' and 'make unittest' to build/run only benchmark or unittests,
|
||||
# 'make benchmark' and 'make unittest' to build/run only benchmark or unittests,
|
||||
# respectively.
|
||||
#
|
||||
# REL_BENCHMARK_NAME is the name of the benchmark app. It may be a single component
|
||||
@@ -306,10 +306,10 @@ endfunction()
|
||||
# \arg PREFIX a string to append to the name of the benchmark executable. For
|
||||
# example, if you have src/arrow/foo/bar-benchmark.cc, then PREFIX "foo" will
|
||||
# create test executable foo-bar-benchmark
|
||||
function(ADD_ARROW_BENCHMARK REL_BENCHMARK_NAME)
|
||||
function(ADD_BENCHMARK REL_BENCHMARK_NAME)
|
||||
set(options)
|
||||
set(one_value_args)
|
||||
set(multi_value_args EXTRA_LINK_LIBS DEPENDENCIES PREFIX)
|
||||
set(multi_value_args EXTRA_LINK_LIBS DEPENDENCIES PREFIX LABELS)
|
||||
cmake_parse_arguments(ARG "${options}" "${one_value_args}" "${multi_value_args}" ${ARGN})
|
||||
if(ARG_UNPARSED_ARGUMENTS)
|
||||
message(SEND_ERROR "Error: unrecognized arguments: ${ARG_UNPARSED_ARGUMENTS}")
|
||||
@@ -329,7 +329,7 @@ function(ADD_ARROW_BENCHMARK REL_BENCHMARK_NAME)
|
||||
set(BENCHMARK_PATH "${EXECUTABLE_OUTPUT_PATH}/${BENCHMARK_NAME}")
|
||||
add_executable(${BENCHMARK_NAME} "${REL_BENCHMARK_NAME}.cc")
|
||||
target_link_libraries(${BENCHMARK_NAME} ${ARROW_BENCHMARK_LINK_LIBS})
|
||||
add_dependencies(runbenchmark ${BENCHMARK_NAME})
|
||||
add_dependencies(benchmark ${BENCHMARK_NAME})
|
||||
set(NO_COLOR "--color_print=false")
|
||||
|
||||
if (ARG_EXTRA_LINK_LIBS)
|
||||
@@ -345,9 +345,21 @@ function(ADD_ARROW_BENCHMARK REL_BENCHMARK_NAME)
|
||||
add_dependencies(${BENCHMARK_NAME} ${ARG_DEPENDENCIES})
|
||||
endif()
|
||||
|
||||
if (ARG_LABELS)
|
||||
set(ARG_LABELS "${ARG_LABELS}")
|
||||
else()
|
||||
set(ARG_LABELS benchmark)
|
||||
endif()
|
||||
|
||||
foreach (TEST_LABEL ${ARG_LABELS})
|
||||
add_dependencies(${TEST_LABEL} ${BENCHMARK_NAME})
|
||||
endforeach()
|
||||
|
||||
add_test(${BENCHMARK_NAME}
|
||||
${BUILD_SUPPORT_DIR}/run-test.sh ${CMAKE_BINARY_DIR} benchmark ${BENCHMARK_PATH} ${NO_COLOR})
|
||||
set_tests_properties(${BENCHMARK_NAME} PROPERTIES LABELS "benchmark")
|
||||
set_property(TEST ${BENCHMARK_NAME}
|
||||
APPEND PROPERTY
|
||||
LABELS ${ARG_LABELS})
|
||||
endfunction()
|
||||
|
||||
############################################################
|
||||
@@ -377,7 +389,7 @@ endfunction()
|
||||
# multiple unit tests in some subgroup, you can assign a test to multiple
|
||||
# groups using the syntax unittest;GROUP2;GROUP3. Custom targets for the group
|
||||
# names must exist
|
||||
function(ADD_ARROW_TEST REL_TEST_NAME)
|
||||
function(ADD_TEST_CASE REL_TEST_NAME)
|
||||
set(options NO_VALGRIND ENABLED)
|
||||
set(one_value_args)
|
||||
set(multi_value_args SOURCES STATIC_LINK_LIBS EXTRA_LINK_LIBS EXTRA_INCLUDES
|
||||
|
||||
@@ -627,7 +627,7 @@ if(ARROW_BUILD_TESTS OR ARROW_BUILD_BENCHMARKS)
|
||||
endif()
|
||||
|
||||
if(ARROW_BUILD_BENCHMARKS)
|
||||
add_custom_target(runbenchmark ctest -L benchmark)
|
||||
add_custom_target(benchmark ctest -L benchmark)
|
||||
|
||||
if("$ENV{GBENCHMARK_HOME}" STREQUAL "")
|
||||
if(NOT MSVC)
|
||||
@@ -664,11 +664,11 @@ if(ARROW_BUILD_BENCHMARKS)
|
||||
message(STATUS "GBenchmark include dir: ${GBENCHMARK_INCLUDE_DIR}")
|
||||
message(STATUS "GBenchmark static library: ${GBENCHMARK_STATIC_LIB}")
|
||||
include_directories(SYSTEM ${GBENCHMARK_INCLUDE_DIR})
|
||||
ADD_THIRDPARTY_LIB(benchmark
|
||||
ADD_THIRDPARTY_LIB(gbenchmark
|
||||
STATIC_LIB ${GBENCHMARK_STATIC_LIB})
|
||||
|
||||
if(GBENCHMARK_VENDORED)
|
||||
add_dependencies(benchmark_static gbenchmark_ep)
|
||||
add_dependencies(gbenchmark_static gbenchmark_ep)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
@@ -15,6 +15,42 @@
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
add_custom_target(arrow)
|
||||
|
||||
# Adding unit tests part of the "arrow" portion of the test suite
|
||||
function(ADD_ARROW_TEST REL_TEST_NAME)
|
||||
set(options)
|
||||
set(one_value_args PREFIX)
|
||||
set(multi_value_args)
|
||||
cmake_parse_arguments(ARG "${options}" "${one_value_args}" "${multi_value_args}" ${ARGN})
|
||||
|
||||
if (ARG_PREFIX)
|
||||
set(PREFIX ${ARG_PREFIX})
|
||||
else()
|
||||
set(PREFIX "arrow")
|
||||
endif()
|
||||
ADD_TEST_CASE(${REL_TEST_NAME}
|
||||
PREFIX ${PREFIX}
|
||||
LABELS "unittest;arrow"
|
||||
${ARG_UNPARSED_ARGUMENTS})
|
||||
endfunction()
|
||||
|
||||
function(ADD_ARROW_BENCHMARK REL_TEST_NAME)
|
||||
set(options)
|
||||
set(one_value_args PREFIX)
|
||||
set(multi_value_args)
|
||||
cmake_parse_arguments(ARG "${options}" "${one_value_args}" "${multi_value_args}" ${ARGN})
|
||||
if (ARG_PREFIX)
|
||||
set(PREFIX ${ARG_PREFIX})
|
||||
else()
|
||||
set(PREFIX "arrow")
|
||||
endif()
|
||||
ADD_BENCHMARK(${REL_TEST_NAME}
|
||||
PREFIX ${PREFIX}
|
||||
LABELS "benchmark;arrow"
|
||||
${ARG_UNPARSED_ARGUMENTS})
|
||||
endfunction()
|
||||
|
||||
set(ARROW_SRCS
|
||||
array.cc
|
||||
buffer.cc
|
||||
@@ -263,3 +299,15 @@ ADD_ARROW_BENCHMARK(column-benchmark)
|
||||
add_subdirectory(csv)
|
||||
add_subdirectory(io)
|
||||
add_subdirectory(util)
|
||||
|
||||
if(ARROW_FLIGHT)
|
||||
add_subdirectory(flight)
|
||||
endif()
|
||||
|
||||
if(ARROW_PYTHON)
|
||||
add_subdirectory(python)
|
||||
endif()
|
||||
|
||||
if(ARROW_HIVESERVER2)
|
||||
add_subdirectory(dbi/hiveserver2)
|
||||
endif()
|
||||
@@ -15,13 +15,19 @@
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
ADD_ARROW_TEST(csv-chunker-test)
|
||||
ADD_ARROW_TEST(csv-column-builder-test)
|
||||
ADD_ARROW_TEST(csv-converter-test)
|
||||
ADD_ARROW_TEST(csv-parser-test)
|
||||
ADD_ARROW_TEST(chunker-test
|
||||
PREFIX "arrow-csv")
|
||||
ADD_ARROW_TEST(column-builder-test
|
||||
PREFIX "arrow-csv")
|
||||
ADD_ARROW_TEST(converter-test
|
||||
PREFIX "arrow-csv")
|
||||
ADD_ARROW_TEST(parser-test
|
||||
PREFIX "arrow-csv")
|
||||
|
||||
ADD_ARROW_BENCHMARK(csv-converter-benchmark)
|
||||
ADD_ARROW_BENCHMARK(csv-parser-benchmark)
|
||||
ADD_ARROW_BENCHMARK(converter-benchmark
|
||||
PREFIX "arrow-csv")
|
||||
ADD_ARROW_BENCHMARK(parser-benchmark
|
||||
PREFIX "arrow-csv")
|
||||
|
||||
# Headers: top level
|
||||
file(GLOB_RECURSE ARROW_CSV_HEADERS "*.h")
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -115,7 +115,7 @@ if (ARROW_BUILD_TESTS)
|
||||
STATIC_LINK_LIBS "${ARROW_HIVESERVER2_TEST_LINK_LIBS}"
|
||||
LABELS "arrow_hiveserver2"
|
||||
)
|
||||
set_property(TARGET hiveserver2-test
|
||||
set_property(TARGET arrow-hiveserver2-test
|
||||
APPEND_STRING PROPERTY COMPILE_FLAGS
|
||||
" -Wno-shadow-field")
|
||||
endif(ARROW_BUILD_TESTS)
|
||||
@@ -18,19 +18,27 @@
|
||||
# ----------------------------------------------------------------------
|
||||
# arrow_io : Arrow IO interfaces
|
||||
|
||||
ADD_ARROW_TEST(io-buffered-test)
|
||||
ADD_ARROW_TEST(io-compressed-test)
|
||||
ADD_ARROW_TEST(io-file-test)
|
||||
ADD_ARROW_TEST(buffered-test
|
||||
PREFIX "arrow-io")
|
||||
ADD_ARROW_TEST(compressed-test
|
||||
PREFIX "arrow-io")
|
||||
ADD_ARROW_TEST(file-test
|
||||
PREFIX "arrow-io")
|
||||
|
||||
if (ARROW_HDFS AND NOT ARROW_BOOST_HEADER_ONLY)
|
||||
ADD_ARROW_TEST(io-hdfs-test NO_VALGRIND)
|
||||
ADD_ARROW_TEST(hdfs-test NO_VALGRIND
|
||||
PREFIX "arrow-io")
|
||||
endif()
|
||||
|
||||
ADD_ARROW_TEST(io-memory-test)
|
||||
ADD_ARROW_TEST(io-readahead-test)
|
||||
ADD_ARROW_TEST(memory-test
|
||||
PREFIX "arrow-io")
|
||||
ADD_ARROW_TEST(readahead-test
|
||||
PREFIX "arrow-io")
|
||||
|
||||
ADD_ARROW_BENCHMARK(io-file-benchmark)
|
||||
ADD_ARROW_BENCHMARK(io-memory-benchmark)
|
||||
ADD_ARROW_BENCHMARK(file-benchmark
|
||||
PREFIX "arrow-io")
|
||||
ADD_ARROW_BENCHMARK(memory-benchmark
|
||||
PREFIX "arrow-io")
|
||||
|
||||
# Headers: top level
|
||||
install(FILES
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -19,9 +19,12 @@
|
||||
# Messaging and interprocess communication
|
||||
|
||||
ADD_ARROW_TEST(feather-test)
|
||||
ADD_ARROW_TEST(ipc-read-write-test)
|
||||
ADD_ARROW_TEST(ipc-json-simple-test)
|
||||
ADD_ARROW_TEST(ipc-json-test)
|
||||
ADD_ARROW_TEST(read-write-test
|
||||
PREFIX "arrow-ipc")
|
||||
ADD_ARROW_TEST(json-simple-test
|
||||
PREFIX "arrow-ipc")
|
||||
ADD_ARROW_TEST(json-test
|
||||
PREFIX "arrow-ipc")
|
||||
|
||||
if (NOT ARROW_BOOST_HEADER_ONLY)
|
||||
ADD_ARROW_TEST(json-integration-test
|
||||
@@ -116,6 +119,6 @@ if (ARROW_BUILD_UTILITIES)
|
||||
target_link_libraries(stream-to-file ${UTIL_LINK_LIBS})
|
||||
endif()
|
||||
|
||||
ADD_ARROW_BENCHMARK(ipc-read-write-benchmark)
|
||||
|
||||
ADD_ARROW_BENCHMARK(read-write-benchmark
|
||||
PREFIX "arrow-ipc")
|
||||
ADD_ARROW_FUZZING(ipc-fuzzing-test)
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -68,16 +68,16 @@ if (ARROW_BUILD_BENCHMARKS)
|
||||
add_library(arrow_benchmark_main benchmark_main.cc)
|
||||
if (APPLE)
|
||||
target_link_libraries(arrow_benchmark_main
|
||||
benchmark_static
|
||||
gbenchmark_static
|
||||
)
|
||||
elseif(MSVC)
|
||||
target_link_libraries(arrow_benchmark_main
|
||||
benchmark_static
|
||||
gbenchmark_static
|
||||
Shlwapi.lib
|
||||
)
|
||||
else()
|
||||
target_link_libraries(arrow_benchmark_main
|
||||
benchmark_static
|
||||
gbenchmark_static
|
||||
pthread
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -153,11 +153,11 @@ function(ADD_GANDIVA_TEST REL_TEST_NAME)
|
||||
# and uses less disk space, but in some cases we need to force static
|
||||
# linking (see rationale below).
|
||||
if (ARG_USE_STATIC_LINKING)
|
||||
ADD_ARROW_TEST(${REL_TEST_NAME}
|
||||
ADD_TEST_CASE(${REL_TEST_NAME}
|
||||
${TEST_ARGUMENTS}
|
||||
STATIC_LINK_LIBS ${GANDIVA_STATIC_TEST_LINK_LIBS})
|
||||
else()
|
||||
ADD_ARROW_TEST(${REL_TEST_NAME}
|
||||
ADD_TEST_CASE(${REL_TEST_NAME}
|
||||
${TEST_ARGUMENTS}
|
||||
STATIC_LINK_LIBS ${GANDIVA_SHARED_TEST_LINK_LIBS})
|
||||
endif()
|
||||
|
||||
@@ -32,6 +32,6 @@ ADD_GANDIVA_TEST(projector_test_static
|
||||
SOURCES projector_test.cc
|
||||
USE_STATIC_LINKING)
|
||||
|
||||
ADD_ARROW_BENCHMARK(micro_benchmarks
|
||||
ADD_BENCHMARK(micro_benchmarks
|
||||
PREFIX "gandiva"
|
||||
EXTRA_LINK_LIBS gandiva_static)
|
||||
@@ -38,12 +38,12 @@ function(ADD_PARQUET_TEST REL_TEST_NAME)
|
||||
# and uses less disk space, but in some cases we need to force static
|
||||
# linking (see rationale below).
|
||||
if (ARG_USE_STATIC_LINKING)
|
||||
ADD_ARROW_TEST(${REL_TEST_NAME}
|
||||
ADD_TEST_CASE(${REL_TEST_NAME}
|
||||
STATIC_LINK_LIBS ${PARQUET_STATIC_TEST_LINK_LIBS}
|
||||
PREFIX "parquet"
|
||||
LABELS "unittest;parquet")
|
||||
else()
|
||||
ADD_ARROW_TEST(${REL_TEST_NAME}
|
||||
ADD_TEST_CASE(${REL_TEST_NAME}
|
||||
STATIC_LINK_LIBS ${PARQUET_SHARED_TEST_LINK_LIBS}
|
||||
PREFIX "parquet"
|
||||
LABELS "unittest;parquet")
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
add_custom_target(plasma)
|
||||
|
||||
# For the moment, Plasma is versioned like Arrow
|
||||
project(plasma VERSION "${ARROW_BASE_VERSION}")
|
||||
@@ -198,8 +198,20 @@ endif()
|
||||
# Unit tests
|
||||
#######################################
|
||||
|
||||
ADD_ARROW_TEST(test/serialization_tests
|
||||
# Adding unit tests part of the "arrow" portion of the test suite
|
||||
function(ADD_PLASMA_TEST REL_TEST_NAME)
|
||||
set(options)
|
||||
set(one_value_args)
|
||||
set(multi_value_args)
|
||||
cmake_parse_arguments(ARG "${options}" "${one_value_args}" "${multi_value_args}" ${ARGN})
|
||||
ADD_TEST_CASE(${REL_TEST_NAME}
|
||||
PREFIX "plasma"
|
||||
LABELS "unittest;plasma"
|
||||
${ARG_UNPARSED_ARGUMENTS})
|
||||
endfunction()
|
||||
|
||||
ADD_PLASMA_TEST(test/serialization_tests
|
||||
EXTRA_LINK_LIBS plasma_shared ${PLASMA_LINK_LIBS})
|
||||
ADD_ARROW_TEST(test/client_tests
|
||||
ADD_PLASMA_TEST(test/client_tests
|
||||
EXTRA_LINK_LIBS plasma_shared ${PLASMA_LINK_LIBS}
|
||||
EXTRA_DEPENDENCIES plasma_store_server)
|
||||
Reference in new issue
Block a user