Skip to content

Commit fb39d4b

Browse files
Enhancement: Adjust binary file location (#535) (#574)
Previously, all unittest files and binary executable files (such as observer/obclient) were put together in `build_*/bin` directory. After the enhancement, the binary executable files and the unittest files have been separated into the following directories respectively: - `build_*/bin` - `build_*/unittest` Issue Number: close #535 ### After enhancement ``` > cd build_debug > ls bin/ clog_dump cpplings obclient oblsm_bench oblsm_cli observer > ls unittesttest/ CMakeFiles bplus_tree_log_entry_test codec_test integer_generator_test mem_pool_test ob_lsm_test pax_storage_test thread_pool_executor_test CTestTestfile.cmake bplus_tree_log_test common log_buffer_test mvcc_trx_log_test ob_skiplist_test persist_test Makefile bplus_tree_test composite_tuple_test log_entry_test ob_arena_test ob_table_test pidfile_test aggregate_hash_table_test buffer_pool_log_test disk_buffer_pool_test log_file_test ob_block_test ob_util_test record_manager_test arithmetic_operator_test catalog_test disk_log_handler_test log_test ob_bloomfilter_test oblsm ring_buffer_test bitmap_test chunk_test double_write_buffer_test lower_bound_test ob_compaction_test observer serializer_test bp_manager_test cmake_install.cmake expression_test md5_test ob_lru_cache_test parser_test simple_queue_test ``` --------- Signed-off-by: Yadunand Kamath <[email protected]>
1 parent 405f673 commit fb39d4b

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,12 @@ jobs:
121121
shell: bash
122122
run: |
123123
cd build_release
124-
${{matrix.memtracer}} ./bin/memtracer_performance_test
124+
${{matrix.memtracer}} ./benchmark/memtracer_performance_test
125125
- name: memtracer-unittest
126126
shell: bash
127127
run: |
128128
cd build_release
129-
LD_PRELOAD=./lib/libmemtracer.so ./bin/memtracer_test
129+
LD_PRELOAD=./lib/libmemtracer.so ./unittest/memtracer_test
130130
- name: memtracer-sysbench
131131
shell: bash
132132
run: |

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ MESSAGE(STATUS "This is Project source dir " ${PROJECT_SOURCE_DIR})
77
MESSAGE(STATUS "This is PROJECT_BINARY_DIR dir " ${PROJECT_BINARY_DIR})
88

99
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
10+
SET(UNITTEST_OUTPUT_PATH ${PROJECT_BINARY_DIR}/unittest)
11+
1012
SET(CMAKE_PREFIX_PATH "${PROJECT_SOURCE_DIR}/deps/3rd/usr/local;/usr/local;${CMAKE_PREFIX_PATH}")
1113
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
1214

benchmark/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ FOREACH (F ${ALL_SRC})
1212
if(NOT ${prjName} STREQUAL "memtracer_performance_test")
1313
TARGET_LINK_LIBRARIES(${prjName} observer_static oblsm)
1414
endif()
15-
15+
SET_TARGET_PROPERTIES(${prjName} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/benchmark)
1616
ENDFOREACH (F)

unittest/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ find_package(GTest CONFIG REQUIRED)
55

66
include(GoogleTest)
77

8+
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${UNITTEST_OUTPUT_PATH})
9+
810
ADD_SUBDIRECTORY(common)
911
ADD_SUBDIRECTORY(oblsm)
1012

0 commit comments

Comments
 (0)