diff options
author | Jose <jose@zeroc.com> | 2009-11-26 23:24:04 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2009-11-26 23:24:04 +0100 |
commit | cd2034a7bd10e15544479e40afc239b085070f46 (patch) | |
tree | bc5580709b76b15e55482316c2ed5f0df1375a84 /cpp/test/FreezeScript/dbmap/run.py | |
parent | 4385 - new StreamApi & UserExecption (diff) | |
download | ice-cd2034a7bd10e15544479e40afc239b085070f46.tar.bz2 ice-cd2034a7bd10e15544479e40afc239b085070f46.tar.xz ice-cd2034a7bd10e15544479e40afc239b085070f46.zip |
4279 - alllTest.py fails to run if source path contains white spaces.
Diffstat (limited to 'cpp/test/FreezeScript/dbmap/run.py')
-rwxr-xr-x | cpp/test/FreezeScript/dbmap/run.py | 42 |
1 files changed, 19 insertions, 23 deletions
diff --git a/cpp/test/FreezeScript/dbmap/run.py b/cpp/test/FreezeScript/dbmap/run.py index 305be843ca8..7fdabe7a6f7 100755 --- a/cpp/test/FreezeScript/dbmap/run.py +++ b/cpp/test/FreezeScript/dbmap/run.py @@ -21,7 +21,7 @@ sys.path.append(os.path.join(path[0])) from scripts import * -transformdb = os.path.join(TestUtil.getCppBinDir(), "transformdb") +transformdb = '%s' % os.path.join(TestUtil.getCppBinDir(), "transformdb") if TestUtil.appverifier: TestUtil.setAppVerifierSettings([transformdb]) @@ -67,13 +67,15 @@ for oldfile in files: else: value = "int" - command = transformdb + " --old " + os.path.join(os.getcwd(), "fail", oldfile) + " --new " + \ - os.path.join(os.getcwd(), "fail", newfile) + " -o tmp.xml --key string --value " + value + command = '"' + transformdb + '" --old "' + os.path.join(os.getcwd(), "fail", oldfile) + '" --new "' + \ + os.path.join(os.getcwd(), "fail", newfile) + '" -o tmp.xml --key string --value ' + value if TestUtil.debug: print command - stdin, stdout, stderr = os.popen3(command) + p = TestUtil.runCommand(command) + (stdin, stdout, stderr) = (p.stdin, p.stdout, p.stderr) + lines1 = stderr.readlines() lines2 = open(os.path.join(os.getcwd(), "fail", oldfile.replace("_old.ice", ".err")), "r").readlines() if len(lines1) != len(lines2): @@ -96,7 +98,7 @@ print "ok" print "creating test database...", sys.stdout.flush() -makedb = os.path.join(os.getcwd(), "makedb") + " " + os.getcwd() +makedb = '"%s" "%s"'% (os.path.join(os.getcwd(), "makedb"), os.getcwd()) proc = TestUtil.spawn(makedb) proc.waitTestSuccess() print "ok" @@ -109,36 +111,30 @@ checkxml = os.path.join(os.getcwd(), "check.xml") print "initializing test database...", sys.stdout.flush() -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) +command = '"' + transformdb + '" --old "' + testold + '" --new "' + testold + '" -f "' + initxml + '" "' + dbdir + \ + '" default.db "' + init_dbdir + '" ' + +TestUtil.spawn(command).waitTestSuccess() 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 -if TestUtil.debug: - print "(" + command + ")", -stdin, stdout, stderr = os.popen3(command) -stderr.readlines() +command = '"' + transformdb + '" --old "' + testold + '" --new "' + testnew + '" --key int --value ::Test::S "' + init_dbdir + \ + '" default.db "' + check_dbdir + '" ' + +TestUtil.spawn(command).waitTestSuccess() print "ok" print "validating database...", sys.stdout.flush() -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) +command = '"' + transformdb + '" --old "' + testnew + '" --new "' + testnew + '" -f "' + checkxml + '" "' + check_dbdir + \ + '" default.db "' + tmp_dbdir + '" ' + +TestUtil.spawn(command).waitTestSuccess() print "ok" |