Commit e6240e59 authored by unknown's avatar unknown

Fix up of Makefiles for NDB Cluster


BitKeeper/deleted/.del-init_rm.c~47230fcd35059112:
  Delete: ndb/tools/init_rm/init_rm.c
ndb/examples/Makefile:
  Add target for clean_dep
ndb/src/Makefile:
  Remove env dir
ndb/test/ndbapi/Makefile:
  Remove some old stuff
ndb/test/ndbapi/flexAsynch/Makefile:
  Cleanup
ndb/test/ndbapi/flexBench/Makefile:
  Cleanup
ndb/test/ndbapi/flexTT/Makefile:
  Cleanup
ndb/test/odbc/Makefile:
  Don't compile test dm-unixodb for now
ndb/tools/Makefile:
  Remove init_rm tool
parent cfaa4790
...@@ -20,6 +20,7 @@ clean: ...@@ -20,6 +20,7 @@ clean:
$(MAKE) -C $$f $@;\ $(MAKE) -C $$f $@;\
done done
clean_dep: clean
cleanall: clean cleanall: clean
tidy: clean tidy: clean
distclean: clean distclean: clean
......
...@@ -5,7 +5,6 @@ DIRS := \ ...@@ -5,7 +5,6 @@ DIRS := \
common \ common \
kernel \ kernel \
ndbapi \ ndbapi \
env \
mgmsrv \ mgmsrv \
mgmapi \ mgmapi \
rep \ rep \
......
...@@ -4,15 +4,13 @@ include .defs.mk ...@@ -4,15 +4,13 @@ include .defs.mk
ifeq ($(NDB_OS), OSE) ifeq ($(NDB_OS), OSE)
DIRS = basic flexBench flexAsynch DIRS = basic flexBench flexAsynch
else else
DIRS = lmc-bench bank DIRS = lmc-bench bank ronja
BIN_DIRS = \ BIN_DIRS = \
flexAsynch \ flexAsynch \
flexBench \ flexBench \
flexHammer \ flexHammer \
flexScan \ flexScan \
flexTT \ flexTT \
nodeRecovery \
restartgci \
create_tab \ create_tab \
create_all_tabs \ create_all_tabs \
drop_all_tabs \ drop_all_tabs \
...@@ -33,8 +31,6 @@ BIN_DIRS = \ ...@@ -33,8 +31,6 @@ BIN_DIRS = \
testRestartGci \ testRestartGci \
testDataBuffers \ testDataBuffers \
testDict \ testDict \
initronja \
benchronja \
acid \ acid \
interpreterInTup \ interpreterInTup \
telco \ telco \
...@@ -42,7 +38,6 @@ BIN_DIRS = \ ...@@ -42,7 +38,6 @@ BIN_DIRS = \
test_event \ test_event \
indexTest2 \ indexTest2 \
testGrep testGrep
# tables \
ifeq ($(NDB_OS), SOLARIS) ifeq ($(NDB_OS), SOLARIS)
ifeq ($(NDB_COMPILER), FORTE6) ifeq ($(NDB_COMPILER), FORTE6)
......
...@@ -9,39 +9,3 @@ SOURCES = flexAsynch.cpp ...@@ -9,39 +9,3 @@ SOURCES = flexAsynch.cpp
include $(NDB_TOP)/Epilogue.mk include $(NDB_TOP)/Epilogue.mk
# run automated tests
test:
@echo "Results test-scripts flexScan." > report.txt
@echo "==============================" >> report.txt
@echo >> report.txt
@echo "User : \t\t\c" >> report.txt
@whoami >> report.txt
@echo "Date : \t\t\c" >> report.txt
@date >> report.txt
@echo >> report.txt
@echo "Host : \t\t\c" >> report.txt
@uname -n >> report.txt
@echo "\nStarting test 1."
@echo "\n==============================\n" >> report.txt
@test1.sh
@echo "\nStarting test 2."
@echo "\n==============================\n" >> report.txt
@test2.sh
@echo "\nStarting test 3."
@echo "\n==============================\n" >> report.txt
@test3.sh
# run basic tests
run_test :
flexBench
flexBench -t 32 -o 5000
flexBench -simple
flexBench -simple -t 32
flexBench -dirty
flexBench -dirty -t 32
flexBench -write
flexBench -write -t 32
flexBench -dirty -write
flexBench -dirty -write -t 32
flexBench -c 16 -t 32 -o 5000
flexBench -t 16 -c 30 -o 10000
...@@ -9,39 +9,3 @@ SOURCES = flexBench.cpp ...@@ -9,39 +9,3 @@ SOURCES = flexBench.cpp
include $(NDB_TOP)/Epilogue.mk include $(NDB_TOP)/Epilogue.mk
# run automated tests
test:
@echo "Results test-scripts flexScan." > report.txt
@echo "==============================" >> report.txt
@echo >> report.txt
@echo "User : \t\t\c" >> report.txt
@whoami >> report.txt
@echo "Date : \t\t\c" >> report.txt
@date >> report.txt
@echo >> report.txt
@echo "Host : \t\t\c" >> report.txt
@uname -n >> report.txt
@echo "\nStarting test 1."
@echo "\n==============================\n" >> report.txt
@test1.sh
@echo "\nStarting test 2."
@echo "\n==============================\n" >> report.txt
@test2.sh
@echo "\nStarting test 3."
@echo "\n==============================\n" >> report.txt
@test3.sh
# run basic tests
run_test :
flexBench
flexBench -t 32 -o 5000
flexBench -simple
flexBench -simple -t 32
flexBench -dirty
flexBench -dirty -t 32
flexBench -write
flexBench -write -t 32
flexBench -dirty -write
flexBench -dirty -write -t 32
flexBench -c 16 -t 32 -o 5000
flexBench -t 16 -c 30 -o 10000
...@@ -9,39 +9,3 @@ SOURCES = flexTT.cpp ...@@ -9,39 +9,3 @@ SOURCES = flexTT.cpp
include $(NDB_TOP)/Epilogue.mk include $(NDB_TOP)/Epilogue.mk
# run automated tests
test:
@echo "Results test-scripts flexScan." > report.txt
@echo "==============================" >> report.txt
@echo >> report.txt
@echo "User : \t\t\c" >> report.txt
@whoami >> report.txt
@echo "Date : \t\t\c" >> report.txt
@date >> report.txt
@echo >> report.txt
@echo "Host : \t\t\c" >> report.txt
@uname -n >> report.txt
@echo "\nStarting test 1."
@echo "\n==============================\n" >> report.txt
@test1.sh
@echo "\nStarting test 2."
@echo "\n==============================\n" >> report.txt
@test2.sh
@echo "\nStarting test 3."
@echo "\n==============================\n" >> report.txt
@test3.sh
# run basic tests
run_test :
flexBench
flexBench -t 32 -o 5000
flexBench -simple
flexBench -simple -t 32
flexBench -dirty
flexBench -dirty -t 32
flexBench -write
flexBench -write -t 32
flexBench -dirty -write
flexBench -dirty -write -t 32
flexBench -c 16 -t 32 -o 5000
flexBench -t 16 -c 30 -o 10000
...@@ -2,9 +2,9 @@ include .defs.mk ...@@ -2,9 +2,9 @@ include .defs.mk
DIRS += driver DIRS += driver
ifneq ($(findstring odbc, $(wildcard /usr/lib/libodbc.so)),) #ifneq ($(findstring odbc, $(wildcard /usr/lib/libodbc.so)),)
DIRS += dm-unixodbc #DIRS += dm-unixodbc
endif #endif
ifneq ($(findstring $(NDB_OS), SOLARIS),) ifneq ($(findstring $(NDB_OS), SOLARIS),)
DIRS += dm-iodbc DIRS += dm-iodbc
......
include .defs.mk include .defs.mk
BIN_DIRS = init_rm select_all select_count desc list_tables \ BIN_DIRS = select_all select_count desc list_tables \
drop_tab delete_all copy_tab \ drop_tab delete_all copy_tab \
create_index drop_index verify_index cpcc create_index drop_index verify_index cpcc
......
/* Copyright (C) 2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <sys/types.h>
#include <dirent.h>
#include <string.h>
#include <stdio.h>
#include <unistd.h>
#include <NdbMain.h>
#include <NdbEnv.h>
void rmdir_recurs(const char* path){
DIR* dirp;
struct dirent * dp;
char buf[255];
dirp = opendir(path);
while ((dp = readdir(dirp)) != NULL){
if ((strcmp(".", dp->d_name) != 0) && (strcmp("..", dp->d_name) != 0)) {
sprintf(buf, "%s/%s", path, dp->d_name);
// printf(" %s\n", buf);
if (remove(buf) == 0){
printf("."); //printf("Removed: %s\n", buf); // The file was removed
} else {
// The file was not removed, try to remove it as a directory
if(rmdir(buf) == 0){
; //printf("Removed dir: %s\n", buf); // The dir was removed
} else {
// The directory was not removed, call this function again recursively
; //printf("Call rm_dir: %s\n", buf);
rmdir_recurs(buf);
rmdir(buf);
}
}
}
}
closedir(dirp);
}
NDB_COMMAND(init_rm, "init_rm", "init_rm [path to dir]", "Removes all files and dirs below [path to dir], default = /d/ndb/fs. WARNING can remove a lot of useful files!", 4096){
if(argc == 2){
printf("Removing all files and dirs in %s\n", argv[1]);
rmdir_recurs(argv[1]);
} else if(argc == 1){
printf("Removing all files and dirs in /d/ndb/fs\n");
rmdir_recurs("/d/ndb/fs");
}
printf("\n");
return 0;
}
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