summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2005-11-09 12:31:52 +0000
committerBenoit Foucher <benoit@zeroc.com>2005-11-09 12:31:52 +0000
commit5c95a0c53d5faf0038a722b7fac70c22cc2da36d (patch)
treea42517580844771b98105ba3b93300153f72717e /cpp
parentFixed directory clean. (diff)
downloadice-5c95a0c53d5faf0038a722b7fac70c22cc2da36d.tar.bz2
ice-5c95a0c53d5faf0038a722b7fac70c22cc2da36d.tar.xz
ice-5c95a0c53d5faf0038a722b7fac70c22cc2da36d.zip
Fixed make clean.
Diffstat (limited to 'cpp')
-rw-r--r--cpp/config/IceGridAdmin.py27
-rw-r--r--cpp/test/IceGrid/deployer/Makefile3
-rw-r--r--cpp/test/IceGrid/replication/Makefile3
-rw-r--r--cpp/test/IceGrid/session/Makefile3
-rwxr-xr-xcpp/test/IceGrid/session/run.py4
-rw-r--r--cpp/test/IceGrid/simple/Makefile3
-rw-r--r--cpp/test/IceGrid/update/Makefile3
-rwxr-xr-xcpp/test/IceGrid/update/run.py8
8 files changed, 19 insertions, 35 deletions
diff --git a/cpp/config/IceGridAdmin.py b/cpp/config/IceGridAdmin.py
index 6f5cc48e6c6..9c428f6d6b8 100644
--- a/cpp/config/IceGridAdmin.py
+++ b/cpp/config/IceGridAdmin.py
@@ -221,29 +221,24 @@ def listAdapters():
def cleanDbDir(path):
- try:
- cleanServerDir(os.path.join(path, "node", "servers"))
- except:
- pass
-
- try:
- TestUtil.cleanDbDir(os.path.join(path, "node", "db"))
- except:
- pass
-
- try:
- TestUtil.cleanDbDir(os.path.join(path, "registry"))
- except:
- pass
+ files = os.listdir(path)
+ for filename in files:
+ if filename != "CVS" and filename != ".dummy":
+ fullpath = os.path.join(path, filename);
+ if os.path.isdir(fullpath):
+ cleanDir(fullpath)
+ os.rmdir(fullpath)
+ else:
+ os.remove(fullpath)
-def cleanServerDir(path):
+def cleanDir(path):
files = os.listdir(path)
for filename in files:
fullpath = os.path.join(path, filename);
if os.path.isdir(fullpath):
- cleanServerDir(fullpath)
+ cleanDir(fullpath)
os.rmdir(fullpath)
else:
os.remove(fullpath)
diff --git a/cpp/test/IceGrid/deployer/Makefile b/cpp/test/IceGrid/deployer/Makefile
index 9c05e812bb6..1ad77aea1be 100644
--- a/cpp/test/IceGrid/deployer/Makefile
+++ b/cpp/test/IceGrid/deployer/Makefile
@@ -53,7 +53,6 @@ $(SVCFILENAME): $(OBJS) $(SERVICE_OBJS)
$(call mkshlib,$@,$(SVCSONAME),$(OBJS) $(SERVICE_OBJS), -lFreeze $(LINKWITH))
clean::
- rm -f db/node/db/servers db/node/db/serveradapters db/node/db/log.*
- rm -f db/registry/*
+ rm -rf db/node db/registry
include .depend
diff --git a/cpp/test/IceGrid/replication/Makefile b/cpp/test/IceGrid/replication/Makefile
index 55650256566..d1faa8d7a2a 100644
--- a/cpp/test/IceGrid/replication/Makefile
+++ b/cpp/test/IceGrid/replication/Makefile
@@ -53,7 +53,6 @@ $(SVCFILENAME): $(OBJS) $(SERVICE_OBJS)
$(call mkshlib,$@,$(SVCSONAME),$(OBJS) $(SERVICE_OBJS),$(LINKWITH))
clean::
- rm -f db/node/db/servers db/node/db/serveradapters db/node/db/log.*
- rm -f db/registry/*
+ rm -rf db/node db/registry
include .depend
diff --git a/cpp/test/IceGrid/session/Makefile b/cpp/test/IceGrid/session/Makefile
index ed8f142ceff..f3e28f93d78 100644
--- a/cpp/test/IceGrid/session/Makefile
+++ b/cpp/test/IceGrid/session/Makefile
@@ -36,7 +36,6 @@ $(SERVER): $(SOBJS)
$(CXX) $(LDFLAGS) -o $@ $(SOBJS) $(LIBS)
clean::
- rm -rf db/node/servers
- rm -f db/registry/*
+ rm -rf db/node db/registry db/node-1
include .depend
diff --git a/cpp/test/IceGrid/session/run.py b/cpp/test/IceGrid/session/run.py
index 665fa6189ff..5256cfec7d3 100755
--- a/cpp/test/IceGrid/session/run.py
+++ b/cpp/test/IceGrid/session/run.py
@@ -37,9 +37,7 @@ iceGridRegistryThread = IceGridAdmin.startIceGridRegistry("12345", testdir, 0)
iceGridNodeThread = IceGridAdmin.startIceGridNode(testdir)
node1Dir = os.path.join(testdir, "db", "node-1")
-if not os.path.exists(node1Dir):
- os.mkdir(node1Dir)
-IceGridAdmin.cleanServerDir(node1Dir);
+os.mkdir(node1Dir)
print "starting client...",
clientPipe = os.popen(client + TestUtil.clientServerOptions + additionalOptions + " 2>&1")
diff --git a/cpp/test/IceGrid/simple/Makefile b/cpp/test/IceGrid/simple/Makefile
index 523f458bbba..8b74a9acb9e 100644
--- a/cpp/test/IceGrid/simple/Makefile
+++ b/cpp/test/IceGrid/simple/Makefile
@@ -41,7 +41,6 @@ $(SERVER): $(OBJS) $(SOBJS)
$(CXX) $(LDFLAGS) -o $@ $(OBJS) $(SOBJS) $(LIBS)
clean::
- rm -f db/node/db/servers db/node/db/serveradapters db/node/db/log.*
- rm -f db/registry/*
+ rm -rf db/node db/registry
include .depend
diff --git a/cpp/test/IceGrid/update/Makefile b/cpp/test/IceGrid/update/Makefile
index 27e0fd7113f..0f826461a0f 100644
--- a/cpp/test/IceGrid/update/Makefile
+++ b/cpp/test/IceGrid/update/Makefile
@@ -42,7 +42,6 @@ $(SERVER): $(OBJS) $(SOBJS)
$(CXX) $(LDFLAGS) -o $@ $(OBJS) $(SOBJS) $(LIBS)
clean::
- rm -rf db/node/servers
- rm -f db/registry/*
+ rm -rf db/node db/registry db/node-1 db/node-2
include .depend
diff --git a/cpp/test/IceGrid/update/run.py b/cpp/test/IceGrid/update/run.py
index 48eb98e6ef7..d733d1bab44 100755
--- a/cpp/test/IceGrid/update/run.py
+++ b/cpp/test/IceGrid/update/run.py
@@ -37,14 +37,10 @@ iceGridRegistryThread = IceGridAdmin.startIceGridRegistry("12345", testdir, 0)
iceGridNodeThread = IceGridAdmin.startIceGridNode(testdir)
node1Dir = os.path.join(testdir, "db", "node-1")
-if not os.path.exists(node1Dir):
- os.mkdir(node1Dir)
-IceGridAdmin.cleanServerDir(node1Dir);
+os.mkdir(node1Dir)
node2Dir = os.path.join(testdir, "db", "node-2")
-if not os.path.exists(node2Dir):
- os.mkdir(node2Dir)
-IceGridAdmin.cleanServerDir(node2Dir);
+os.mkdir(node2Dir)
nodeOverrideOptions = ' --NodePropertiesOverride="' + TestUtil.clientServerOptions.replace("--", "") + \
' Ice.ServerIdleTime=0 Ice.PrintProcessId=0 Ice.PrintAdapterReady=0' + '"'