Exemplo n.º 1
0
Arquivo: run.py Projeto: citms/freeze
            line1 = regex2.sub("", lines1[i].decode("utf-8")).strip()
            line2 = regex2.sub("", lines2[i]).strip()
        if line1 != line2:
            print("failed! (2)")
            print("line1 = " + line1)
            print("line2 = " + line2)
            # sys.exit(1)
        i = i + 1

print("ok")

sys.stdout.write("creating test database... ")
sys.stdout.flush()

makedb = os.path.join(os.getcwd(), TestUtil.getTestExecutable("makedb"))
proc = TestUtil.spawn(makedb)
proc.waitTestSuccess()
print("ok")

testold = os.path.join(os.getcwd(), "TestOld.ice")
testnew = os.path.join(os.getcwd(), "TestNew.ice")
initxml = os.path.join(os.getcwd(), "init.xml")
checkxml = os.path.join(os.getcwd(), "check.xml")

sys.stdout.write("initializing test database... ")
sys.stdout.flush()

command = '"' + transformdb + '" --old "' + testold + '" --new "' + testold + '" -f "' + initxml + '" "' + dbdir + \
    '" default.db "' + init_dbdir + '" '

TestUtil.spawn(command).waitTestSuccess()
Exemplo n.º 2
0
            line1 = regex2.sub("", lines1[i].decode("utf-8")).strip()
            line2 = regex2.sub("", lines2[i]).strip()
        if line1 != line2:
            print("failed! (2)")
            print("line1 = " + line1)
            print("line2 = " + line2)
            # sys.exit(1)
        i = i + 1

print("ok")

sys.stdout.write("creating test database... ")
sys.stdout.flush()

makedb = os.path.join(os.getcwd(), TestUtil.getTestExecutable("makedb"))
proc = TestUtil.spawn(makedb)
proc.waitTestSuccess()
print("ok")

testold = os.path.join(os.getcwd(), "TestOld.ice")
testnew = os.path.join(os.getcwd(), "TestNew.ice")
initxml = os.path.join(os.getcwd(), "init.xml")
checkxml = os.path.join(os.getcwd(), "check.xml")

sys.stdout.write("initializing test database... ")
sys.stdout.flush()

command = '"' + transformdb + '" --old "' + testold + '" --new "' + testold + '" -f "' + initxml + '" "' + dbdir + \
    '" default.db "' + init_dbdir + '" '

TestUtil.spawn(command).waitTestSuccess()
Exemplo n.º 3
0
check_dbdir = os.path.join(os.getcwd(), "db_check")
if os.path.exists(check_dbdir):
    shutil.rmtree(check_dbdir)
os.mkdir(check_dbdir)

tmp_dbdir = os.path.join(os.getcwd(), "db_tmp")
if os.path.exists(tmp_dbdir):
    shutil.rmtree(tmp_dbdir)
os.mkdir(tmp_dbdir)

sys.stdout.write("creating test database... ")
sys.stdout.flush()

makedb = os.path.join(os.getcwd(), TestUtil.getTestExecutable("makedb"))
proc = TestUtil.spawn(makedb)
proc.waitTestSuccess()
print("ok")

testold = os.path.join(os.getcwd(), "TestOld.ice")
testnew = os.path.join(os.getcwd(), "TestNew.ice")
transformxml = os.path.join(os.getcwd(), "transform.xml")
checkxml = os.path.join(os.getcwd(), "check.xml")

sys.stdout.write("executing evictor transformations... ")
sys.stdout.flush()

command = '"' + transformdb + '" -e -p --old "' + testold + '" --new "' + testnew + '" -f "' + transformxml + '" "' + dbdir + \
    '" evictor.db "' + check_dbdir + '" '
proc = TestUtil.spawn(command)
proc.waitTestSuccess()
Exemplo n.º 4
0
Arquivo: run.py Projeto: citms/freeze
check_dbdir = os.path.join(os.getcwd(), "db_check")
if os.path.exists(check_dbdir):
    shutil.rmtree(check_dbdir)
os.mkdir(check_dbdir)

tmp_dbdir = os.path.join(os.getcwd(), "db_tmp")
if os.path.exists(tmp_dbdir):
    shutil.rmtree(tmp_dbdir)
os.mkdir(tmp_dbdir)

sys.stdout.write("creating test database... ")
sys.stdout.flush()

makedb = os.path.join(os.getcwd(), TestUtil.getTestExecutable("makedb"))
proc = TestUtil.spawn(makedb)
proc.waitTestSuccess()
print("ok")

testold = os.path.join(os.getcwd(), "TestOld.ice")
testnew = os.path.join(os.getcwd(), "TestNew.ice")
transformxml = os.path.join(os.getcwd(), "transform.xml")
checkxml = os.path.join(os.getcwd(), "check.xml")

sys.stdout.write("executing evictor transformations... ")
sys.stdout.flush()

command = '"' + transformdb + '" -e -p --old "' + testold + '" --new "' + testnew + '" -f "' + transformxml + '" "' + dbdir + \
    '" evictor.db "' + check_dbdir + '" '
proc = TestUtil.spawn(command)
proc.waitTestSuccess()