diff --git a/CMakeLists.txt b/CMakeLists.txt index 6805c7eef..5bb123cd2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -333,11 +333,6 @@ ADD_SUBDIRECTORY(storage-manager) ADD_SUBDIRECTORY(datatypes) ADD_SUBDIRECTORY(tests) -# WriteEngine component tests -IF( WITH_SHARED_COMP_TESTS ) - ADD_SUBDIRECTORY(writeengine/shared) -ENDIF( WITH_SHARED_COMP_TESTS ) - find_package(Git QUIET) IF (GIT_FOUND AND EXISTS ${ENGINE_SRC_DIR}/.git) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 1b10181e8..30a80cec7 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -29,3 +29,10 @@ if (WITH_SORTING_COMPARATORS_UT) target_link_libraries(comparators_tests ${ENGINE_LDFLAGS} ${MARIADB_CLIENT_LIBS} ${ENGINE_WRITE_LIBS} ${CPPUNIT_LIBRARIES} cppunit) install(TARGETS comparators_tests DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-engine) endif() + +if (WITH_SHARED_COMP_TESTS) + add_executable(we_shared_components_tests shared_components_tests.cpp) + add_dependencies(we_shared_components_tests loggingcpp) + target_link_libraries(we_shared_components_tests ${ENGINE_LDFLAGS} ${MARIADB_CLIENT_LIBS} ${ENGINE_WRITE_LIBS} cppunit) + install(TARGETS we_shared_components_tests DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-engine) +endif() diff --git a/writeengine/shared/shared_components_tests.cpp b/tests/shared_components_tests.cpp similarity index 99% rename from writeengine/shared/shared_components_tests.cpp rename to tests/shared_components_tests.cpp index 6ba4ca229..c84105a47 100644 --- a/writeengine/shared/shared_components_tests.cpp +++ b/tests/shared_components_tests.cpp @@ -396,7 +396,7 @@ public: int width = blockOp.getCorrectRowWidth( execplan::CalpontSystemCatalog::BIGINT, 8 ); int nBlocks = INITIAL_EXTENT_ROWS_TO_DISK / BYTE_PER_BLOCK * width; - uint64_t emptyVal = blockOp.getEmptyRowValue( execplan::CalpontSystemCatalog::BIGINT, 8 ); + const uint8_t* emptyVal = blockOp.getEmptyRowValue( execplan::CalpontSystemCatalog::BIGINT, 8 ); // createFile runs IDBDataFile::open + initAbrevCompColumnExtent // under the hood // bigint column file @@ -979,7 +979,7 @@ public: int width = blockOp.getCorrectRowWidth( execplan::CalpontSystemCatalog::BIGINT, 8 ); int nBlocks = INITIAL_EXTENT_ROWS_TO_DISK / BYTE_PER_BLOCK * width; - uint64_t emptyVal = blockOp.getEmptyRowValue( execplan::CalpontSystemCatalog::BIGINT, 8 ); + const uint8_t* emptyVal = blockOp.getEmptyRowValue( execplan::CalpontSystemCatalog::BIGINT, 8 ); // createFile runs IDBDataFile::open + initAbrevCompColumnExtent // under the hood // bigint column file @@ -1542,7 +1542,7 @@ public: } } -*/ + template struct binary; typedef binary<16> binary16; typedef binary<32> binary32; @@ -1715,6 +1715,7 @@ public: CPPUNIT_ASSERT(fileOp.exists(fileName) == false); cout << endl << "End of test"; } + */ void testCleanup() { diff --git a/writeengine/shared/CMakeLists.txt b/writeengine/shared/CMakeLists.txt index 71bff590a..f678d3690 100644 --- a/writeengine/shared/CMakeLists.txt +++ b/writeengine/shared/CMakeLists.txt @@ -1,14 +1,4 @@ -include_directories(${ENGINE_COMMON_INCLUDES} ../dictionary) - -add_executable(we_shared_components_tests ./shared_components_tests.cpp) - -add_dependencies(we_shared_components_tests loggingcpp) - -target_link_libraries(we_shared_components_tests ${ENGINE_LDFLAGS} ${MARIADB_CLIENT_LIBS} ${ENGINE_WRITE_LIBS} ${CPPUNIT_LIBRARIES}) - -install(TARGETS we_shared_components_tests DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-engine) - ########### install files ############### install(FILES we_index.h we_define.h we_type.h we_fileop.h we_blockop.h we_dbfileop.h we_obj.h we_log.h we_simplesyslog.h we_convertor.h we_brm.h we_macro.h we_config.h we_cache.h we_stats.h we_bulkrollbackmgr.h we_typeext.h we_chunkmanager.h we_bulkrollbackfilecompressed.h we_bulkrollbackfilecompressedhdfs.h we_bulkrollbackfile.h we_rbmetawriter.h we_dbrootextenttracker.h we_confirmhdfsdbfile.h DESTINATION include)