Commit 5e02433f authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

closes #5667 add __SRCFILE__ to src/tests, use it in test_error.tdb


git-svn-id: file:///svn/toku/tokudb@50326 c7de825b-a66e-492c-adef-691d508d4ae1
parent 57204cd2
...@@ -329,7 +329,7 @@ if(BUILD_TESTING OR BUILD_SRC_TESTS) ...@@ -329,7 +329,7 @@ if(BUILD_TESTING OR BUILD_SRC_TESTS)
add_executable(test-5138.tdb test-5138) add_executable(test-5138.tdb test-5138)
target_link_libraries(test-5138.tdb ${LIBTOKUDB}_static ${LIBTOKUPORTABILITY}_static) target_link_libraries(test-5138.tdb ${LIBTOKUDB}_static ${LIBTOKUPORTABILITY}_static)
set_property(TARGET test-5138.tdb APPEND PROPERTY set_property(TARGET test-5138.tdb APPEND PROPERTY
COMPILE_DEFINITIONS "ENVDIR=\"dir.test-5138.tdb\";USE_TDB;IS_TDB=1;TOKUDB=1") COMPILE_DEFINITIONS "ENVDIR=\"dir.test-5138.tdb\";USE_TDB;IS_TDB=1;TOKUDB=1;__SRCFILE__=test-5138")
set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "dir.test-5138.tdb") set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "dir.test-5138.tdb")
add_common_options_to_binary_targets(test-5138.tdb) add_common_options_to_binary_targets(test-5138.tdb)
add_test(ydb/test-5138.tdb test-5138.tdb) add_test(ydb/test-5138.tdb test-5138.tdb)
...@@ -344,7 +344,7 @@ if(BUILD_TESTING OR BUILD_SRC_TESTS) ...@@ -344,7 +344,7 @@ if(BUILD_TESTING OR BUILD_SRC_TESTS)
# some of those things (i.e. kibbutz in the threaded tests). # some of those things (i.e. kibbutz in the threaded tests).
target_link_libraries(${base}.tdb util ${LIBTOKUDB} ${LIBTOKUPORTABILITY}) target_link_libraries(${base}.tdb util ${LIBTOKUDB} ${LIBTOKUPORTABILITY})
set_property(TARGET ${base}.tdb APPEND PROPERTY set_property(TARGET ${base}.tdb APPEND PROPERTY
COMPILE_DEFINITIONS "ENVDIR=\"dir.${bin}\";USE_TDB;IS_TDB=1;TOKUDB=1") COMPILE_DEFINITIONS "ENVDIR=\"dir.${bin}\";USE_TDB;IS_TDB=1;TOKUDB=1;__SRCFILE__=${base}")
set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "dir.${bin}") set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "dir.${bin}")
add_common_options_to_binary_targets(${base}.tdb) add_common_options_to_binary_targets(${base}.tdb)
endforeach(bin) endforeach(bin)
...@@ -355,7 +355,7 @@ if(BUILD_TESTING OR BUILD_SRC_TESTS) ...@@ -355,7 +355,7 @@ if(BUILD_TESTING OR BUILD_SRC_TESTS)
add_executable(${base}.bdb ${base}) add_executable(${base}.bdb ${base})
set_property(TARGET ${base}.bdb APPEND PROPERTY set_property(TARGET ${base}.bdb APPEND PROPERTY
COMPILE_DEFINITIONS "ENVDIR=\"dir.${bin}\";USE_BDB;IS_TDB=0;TOKU_ALLOW_DEPRECATED") COMPILE_DEFINITIONS "ENVDIR=\"dir.${bin}\";USE_BDB;IS_TDB=0;TOKU_ALLOW_DEPRECATED;__SRCFILE__=${base}")
set_target_properties(${base}.bdb PROPERTIES set_target_properties(${base}.bdb PROPERTIES
INCLUDE_DIRECTORIES "${BDB_INCLUDE_DIR};${CMAKE_CURRENT_BINARY_DIR}/../../toku_include;${CMAKE_CURRENT_SOURCE_DIR}/../../toku_include;${CMAKE_CURRENT_SOURCE_DIR}/../../portability;${CMAKE_CURRENT_SOURCE_DIR}/../..") INCLUDE_DIRECTORIES "${BDB_INCLUDE_DIR};${CMAKE_CURRENT_BINARY_DIR}/../../toku_include;${CMAKE_CURRENT_SOURCE_DIR}/../../toku_include;${CMAKE_CURRENT_SOURCE_DIR}/../../portability;${CMAKE_CURRENT_SOURCE_DIR}/../..")
target_link_libraries(${base}.bdb ${LIBTOKUPORTABILITY} ${BDB_LIBRARIES}) target_link_libraries(${base}.bdb ${LIBTOKUPORTABILITY} ${BDB_LIBRARIES})
...@@ -379,7 +379,7 @@ if(BUILD_TESTING OR BUILD_SRC_TESTS) ...@@ -379,7 +379,7 @@ if(BUILD_TESTING OR BUILD_SRC_TESTS)
add_executable(${prefix}_${binary} ${source}) add_executable(${prefix}_${binary} ${source})
target_link_libraries(${prefix}_${binary} util ${LIBTOKUDB} ${LIBTOKUPORTABILITY}) target_link_libraries(${prefix}_${binary} util ${LIBTOKUDB} ${LIBTOKUPORTABILITY})
set_target_properties(${prefix}_${binary} PROPERTIES set_target_properties(${prefix}_${binary} PROPERTIES
COMPILE_DEFINITIONS "ENVDIR=\"dir.${prefix}_${source}.tdb\";USE_TDB;IS_TDB=1;TOKUDB=1") COMPILE_DEFINITIONS "ENVDIR=\"dir.${prefix}_${source}.tdb\";USE_TDB;IS_TDB=1;TOKUDB=1;SRCFILE__=${source}")
set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "dir.${prefix}_${source}.tdb") set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "dir.${prefix}_${source}.tdb")
add_common_options_to_binary_targets(${prefix}_${binary}) add_common_options_to_binary_targets(${prefix}_${binary})
endfunction(add_custom_executable) endfunction(add_custom_executable)
......
...@@ -44,7 +44,7 @@ test_main (int argc, char *const argv[]) { ...@@ -44,7 +44,7 @@ test_main (int argc, char *const argv[]) {
for (do_errpfx=0; do_errpfx<2; do_errpfx++) { for (do_errpfx=0; do_errpfx<2; do_errpfx++) {
for (do_errfile=0; do_errfile<2; do_errfile++) { for (do_errfile=0; do_errfile<2; do_errfile++) {
for (do_errcall=0; do_errcall<2; do_errcall++) { for (do_errcall=0; do_errcall<2; do_errcall++) {
char errfname[] = __FILE__ ".errs"; char errfname[] = __SRCFILE__ ".errs";
unlink(errfname); unlink(errfname);
{ {
DB_ENV *env; DB_ENV *env;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment