示例#1
0
def run(file):
    start = time.time()
    status = dsolve.solve_quals(file, True, True, [" -v 0 "])
    if status == 2: sys.exit(2)
    end = time.time() - start
    print "%f seconds" % (end)

    return end
示例#2
0
def run(file):
  start = time.time()
  status = dsolve.solve_quals(file, True, True, [" -v 0 "])
  if status == 2: sys.exit(2)
  end = time.time() - start
  print "%f seconds" % (end)

  return end
示例#3
0
def runtest(filep, expected_status):
    file = filep[0]
    collect = int(filep[1])
    lqualifs = common.str_to_bool(filep[2])
    status = dsolve.gen_quals(file, False, lqualifs, collect)
    if status != 0:
        print "Qualgen failed on %s" % file
        sys.exit(2)
    start = time.time()
    status = dsolve.solve_quals(file, False, True, [" -v 0 "])
    if status == 2: sys.exit(2)
    print "%f seconds" % (time.time() - start)

    ok = (status == expected_status)
    if ok:
        print "\033[1;32mSUCCESS!\033[1;0m\n"
    else:
        print "\033[1;31mFAILURE :(\033[1;0m\n"
    return (file, ok)
示例#4
0
def runtest(filep, expected_status):
  file = filep[0]
  collect = int(filep[1])
  lqualifs = common.str_to_bool(filep[2])
  status = dsolve.gen_quals(file, False, lqualifs, collect)
  if status != 0: 
    print "Qualgen failed on %s" % file
    sys.exit(2)
  start = time.time()
  status = dsolve.solve_quals(file, False, True, [" -v 0 "])
  if status == 2: sys.exit(2)
  print "%f seconds" % (time.time() - start)

  ok = (status == expected_status)
  if ok:
    print "\033[1;32mSUCCESS!\033[1;0m\n"
  else:
    print "\033[1;31mFAILURE :(\033[1;0m\n"
  return (file, ok)
示例#5
0
def runtest(file, norecrefs):
    expected_stats = 0
    include = "../../theories"
    status = dsolve.gen_quals(file, True, "-I " + include)
    if status != 0:
        print "Qualgen failed on %s" % file
        sys.exit(2)
    start = time.time()
    flags = ["-v", "0", "-no-simple", "-no-timing", "-I", include]
    if norecrefs:
        flags += ["-no-recrefs"]
    status = dsolve.solve_quals(file, True, False, True, flags)
    if status == 2: sys.exit(2)
    print "%f seconds" % (time.time() - start)

    ok = (status == expected_status)
    if ok:
        print "\033[1;32mSUCCESS!\033[1;0m\n"
    else:
        print "\033[1;31mFAILURE :(\033[1;0m\n"
    return (file, ok)
示例#6
0
def runtest(file, norecrefs):
  expected_stats = 0
  include = "../../theories"
  status = dsolve.gen_quals(file, True, "-I " + include)
  if status != 0: 
    print "Qualgen failed on %s" % file
    sys.exit(2)
  start = time.time()
  flags = ["-v", "0", "-no-simple", "-no-timing", "-I", include]
  if norecrefs:
    flags += ["-no-recrefs"]
  status = dsolve.solve_quals(file, True, False, True, flags)
  if status == 2: sys.exit(2)
  print "%f seconds" % (time.time() - start)

  ok = (status == expected_status)
  if ok:
    print "\033[1;32mSUCCESS!\033[1;0m\n"
  else:
    print "\033[1;31mFAILURE :(\033[1;0m\n"
  return (file, ok)
示例#7
0
def runtest(file, expected_status):
  include = "theories"
  status = dsolve.gen_quals(file, False, "-I " + include)
  if status != 0: 
    print "Qualgen failed on %s" % file
    sys.exit(2)
  start = time.time()
  status = dsolve.solve_quals(file, True, False, True, ["-v", "0", "-fix", "-simpguard", "-no-simple", "-no-timing", "-I", include])
  #if status == 2: sys.exit(2)
  print "%f seconds" % (time.time() - start)

  ok = (status == expected_status)
  if ok:
    print "\033[1;32mSUCCESS!\033[1;0m\n"
  else:
    print "\033[1;31mFAILURE :(\033[1;0m\n"
  if ok:
    (_, _, f) = file.rpartition("/")
    os.system("mv /tmp/fix.in.fq %s/%s.in.fq" % (dstdir, f))
    os.system("mv /tmp/fix.out.fq %s/%s.out.fq" % (dstdir, f))
  return (file, ok)
示例#8
0
def runtest(file, expected_status):
    include = "theories"
    status = dsolve.gen_quals(file, False, "-I " + include)
    if status != 0:
        print "Qualgen failed on %s" % file
        sys.exit(2)
    start = time.time()
    status = dsolve.solve_quals(file, True, False, True, [
        "-v", "0", "-fix", "-simpguard", "-no-simple", "-no-timing", "-I",
        include
    ])
    #if status == 2: sys.exit(2)
    print "%f seconds" % (time.time() - start)

    ok = (status == expected_status)
    if ok:
        print "\033[1;32mSUCCESS!\033[1;0m\n"
    else:
        print "\033[1;31mFAILURE :(\033[1;0m\n"
    if ok:
        (_, _, f) = file.rpartition("/")
        os.system("mv /tmp/fix.in.fq %s/%s.in.fq" % (dstdir, f))
        os.system("mv /tmp/fix.out.fq %s/%s.out.fq" % (dstdir, f))
    return (file, ok)