summaryrefslogtreecommitdiff
path: root/cpp/test/FreezeScript/dbmap/run.py
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2006-12-05 01:11:29 +0000
committerMark Spruiell <mes@zeroc.com>2006-12-05 01:11:29 +0000
commitd8e4f7bb335a7cdf6a7ba61eec449ba817634912 (patch)
tree51982c4c4a813c8f56066ff3698299bf50c781bc /cpp/test/FreezeScript/dbmap/run.py
parentbug 1517: use catalog in FreezeScript tools (diff)
downloadice-d8e4f7bb335a7cdf6a7ba61eec449ba817634912.tar.bz2
ice-d8e4f7bb335a7cdf6a7ba61eec449ba817634912.tar.xz
ice-d8e4f7bb335a7cdf6a7ba61eec449ba817634912.zip
add debug support
Diffstat (limited to 'cpp/test/FreezeScript/dbmap/run.py')
-rwxr-xr-xcpp/test/FreezeScript/dbmap/run.py25
1 files changed, 21 insertions, 4 deletions
diff --git a/cpp/test/FreezeScript/dbmap/run.py b/cpp/test/FreezeScript/dbmap/run.py
index 6e25330dc20..fbdcdc6f216 100755
--- a/cpp/test/FreezeScript/dbmap/run.py
+++ b/cpp/test/FreezeScript/dbmap/run.py
@@ -51,6 +51,8 @@ regex2 = re.compile(r"^.*transf(ormdb|~1)(\.exe)?", re.IGNORECASE)
print "testing error detection...",
sys.stdout.flush()
+if TestUtil.debug:
+ print
files.sort()
for oldfile in files:
@@ -62,7 +64,11 @@ for oldfile in files:
else:
value = "int"
- command = transformdb + " --old " + os.path.join(directory, "fail", oldfile) + " --new " + os.path.join(directory, "fail", newfile) + " -o tmp.xml --key string --value " + value
+ command = transformdb + " --old " + os.path.join(directory, "fail", oldfile) + " --new " + \
+ os.path.join(directory, "fail", newfile) + " -o tmp.xml --key string --value " + value
+
+ if TestUtil.debug:
+ print command
stdin, stdout, stderr = os.popen3(command)
lines1 = stderr.readlines()
@@ -88,6 +94,8 @@ print "creating test database...",
sys.stdout.flush()
makedb = os.path.join(directory, "makedb") + " " + directory
+if TestUtil.debug:
+ print "(" + makedb + ")",
if os.system(makedb) != 0:
sys.exit(1)
@@ -101,7 +109,10 @@ checkxml = os.path.join(directory, "check.xml")
print "initializing test database...",
sys.stdout.flush()
-command = transformdb + " --old " + testold + " --new " + testold + " -f " + initxml + " " + dbdir + " default.db " + init_dbdir
+command = transformdb + " --old " + testold + " --new " + testold + " -f " + initxml + " " + dbdir + \
+ " default.db " + init_dbdir
+if TestUtil.debug:
+ print "(" + command + ")",
if os.system(command) != 0:
sys.exit(1)
@@ -110,7 +121,10 @@ print "ok"
print "executing default transformations...",
sys.stdout.flush()
-command = transformdb + " --old " + testold + " --new " + testnew + " --key int --value ::Test::S " + init_dbdir + " default.db " + check_dbdir
+command = transformdb + " --old " + testold + " --new " + testnew + " --key int --value ::Test::S " + init_dbdir + \
+ " default.db " + check_dbdir
+if TestUtil.debug:
+ print "(" + command + ")",
stdin, stdout, stderr = os.popen3(command)
stderr.readlines()
@@ -119,7 +133,10 @@ print "ok"
print "validating database...",
sys.stdout.flush()
-command = transformdb + " --old " + testnew + " --new " + testnew + " -f " + checkxml + " " + check_dbdir + " default.db " + tmp_dbdir
+command = transformdb + " --old " + testnew + " --new " + testnew + " -f " + checkxml + " " + check_dbdir + \
+ " default.db " + tmp_dbdir
+if TestUtil.debug:
+ print "(" + command + ")",
if os.system(command) != 0:
sys.exit(1)