diff options
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/config/IceGridAdmin.py | 27 | ||||
-rw-r--r-- | cpp/test/IceGrid/deployer/Makefile | 3 | ||||
-rw-r--r-- | cpp/test/IceGrid/replication/Makefile | 3 | ||||
-rw-r--r-- | cpp/test/IceGrid/session/Makefile | 3 | ||||
-rwxr-xr-x | cpp/test/IceGrid/session/run.py | 4 | ||||
-rw-r--r-- | cpp/test/IceGrid/simple/Makefile | 3 | ||||
-rw-r--r-- | cpp/test/IceGrid/update/Makefile | 3 | ||||
-rwxr-xr-x | cpp/test/IceGrid/update/run.py | 8 |
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' + '"' |