Commit 557c243d authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

[t:4948] move upgrade_test_data.ft.* from tokudb to tokudb.data

git-svn-id: file:///svn/toku/tokudb@44095 c7de825b-a66e-492c-adef-691d508d4ae1
parent 6e358f25
...@@ -23,13 +23,15 @@ if(BUILD_TESTING) ...@@ -23,13 +23,15 @@ if(BUILD_TESTING)
add_test(logcursor-fw echo "logcursor-fw must be run manually (needs logs to iterate over).") add_test(logcursor-fw echo "logcursor-fw must be run manually (needs logs to iterate over).")
add_test(logcursor-bw echo "logcursor-bw must be run manually (needs logs to iterate over).") add_test(logcursor-bw echo "logcursor-bw must be run manually (needs logs to iterate over).")
get_filename_component(toku_svn_root "${TokuDB_SOURCE_DIR}/../.." REALPATH)
foreach(src ${srcs}) foreach(src ${srcs})
if(NOT "${src}" MATCHES "dir[.].*[.]c") ## annoying if(NOT "${src}" MATCHES "dir[.].*[.]c") ## annoying
get_filename_component(base ${src} NAME_WE) get_filename_component(base ${src} NAME_WE)
add_executable(${base} ${src}) add_executable(${base} ${src})
target_link_libraries(${base} ft ${LIBTOKUPORTABILITY}) target_link_libraries(${base} ft ${LIBTOKUPORTABILITY})
set_property(TARGET ${base} APPEND PROPERTY set_property(TARGET ${base} APPEND PROPERTY
COMPILE_DEFINITIONS "__SRCFILE__=\"${src}\"") COMPILE_DEFINITIONS "__SRCFILE__=\"${src}\";TOKUSVNROOT=\"${toku_svn_root}\"")
set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "${src}.ft_handle") set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "${src}.ft_handle")
endif() endif()
endforeach(src) endforeach(src)
......
...@@ -119,9 +119,9 @@ with_open_tree(const char *fname, tree_cb cb, void *cb_extra) ...@@ -119,9 +119,9 @@ with_open_tree(const char *fname, tree_cb cb, void *cb_extra)
} }
#define TMPFTFMT "%s-tmpdata.ft_handle" #define TMPFTFMT "%s-tmpdata.ft_handle"
static const char *origft_5_0 = "upgrade_test_data.ft.5.0"; static const char *origft_5_0 = TOKUSVNROOT "/tokudb.data/upgrade_test_data.ft.5.0.gz";
static const char *origft_4_2 = "upgrade_test_data.ft.4.2"; static const char *origft_4_2 = TOKUSVNROOT "/tokudb.data/upgrade_test_data.ft.4.2.gz";
static const char *not_flat_4_2 = "upgrade_test_data.ft.4.2.not.flat"; static const char *not_flat_4_2 = TOKUSVNROOT "/tokudb.data/upgrade_test_data.ft.4.2.not.flat.gz";
static int static int
run_test(const char *prog, const char *origft) { run_test(const char *prog, const char *origft) {
...@@ -133,14 +133,11 @@ run_test(const char *prog, const char *origft) { ...@@ -133,14 +133,11 @@ run_test(const char *prog, const char *origft) {
size_t templen = strlen(progdir) + strlen(prog) + strlen(TMPFTFMT) - 1; size_t templen = strlen(progdir) + strlen(prog) + strlen(TMPFTFMT) - 1;
char tempft[templen + 1]; char tempft[templen + 1];
snprintf(tempft, templen + 1, TMPFTFMT, prog); snprintf(tempft, templen + 1, TMPFTFMT, prog);
size_t fullorigftlen = strlen(progdir) + strlen(origft) + 1;
char fullorigft[fullorigftlen + 1];
snprintf(fullorigft, fullorigftlen + 1, "%s/%s", progdir, origft);
toku_free(fullprog); toku_free(fullprog);
{ {
size_t len = 4 + strlen(fullorigft) + strlen(tempft); size_t len = 13 + strlen(origft) + strlen(tempft);
char buf[len + 1]; char buf[len + 1];
snprintf(buf, len + 1, "gunzip -c %s.gz > %s", fullorigft, tempft); snprintf(buf, len + 1, "gunzip -c %s > %s", origft, tempft);
r = system(buf); r = system(buf);
CKERR(r); CKERR(r);
} }
......
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