From 8b21cf03acd6506a4d965607a3782953e9a50189 Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Sun, 11 May 2014 15:41:29 +0100 Subject: Remove old python testing scripts --- Test/test1/runtest.py | 74 --------------------------------------------------- 1 file changed, 74 deletions(-) delete mode 100755 Test/test1/runtest.py (limited to 'Test/test1') diff --git a/Test/test1/runtest.py b/Test/test1/runtest.py deleted file mode 100755 index 4ef5dd85..00000000 --- a/Test/test1/runtest.py +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/python - -# 2013 Pantazis Deligiannis -# -# runs the test cases of this directory - -import sys; -import os; -import getopt; - -MONO = "/usr/bin/mono " -BOOGIE = "/Users/pantazis/workspace/boogie/Binaries/Boogie.exe " - -PROVER_OPTIONS_Z3 = "/nologo " -PROVER_OPTIONS_CVC4 = "/proverOpt:SOLVER=cvc4 /nologo " - -# choose a parser -opts, args = getopt.getopt(sys.argv[1:], "s:", ["solver="]) -solver = "Z3" -for o, a in opts: - if o in ("-s", "--solver"): - if a == "cvc4": - solver = a - -# if the Output file exists remove it -if os.path.exists("Output"): - os.remove("Output") - -# runs the given test -def runtest(filename): - if solver == "cvc4": - if os.name == "nt": - command = BOOGIE + PROVER_OPTIONS_CVC4 + filename - else: - command = MONO + BOOGIE + PROVER_OPTIONS_CVC4 + filename - else: - if os.name == "nt": - command = BOOGIE + PROVER_OPTIONS_Z3 + filename - else: - command = MONO + BOOGIE + PROVER_OPTIONS_Z3 + filename - - print "===== Testing: " + filename - - if os.path.exists("Output"): - os.system(command + " >> Output") - else: - os.system(command + " > Output") - -runtest("Frame0.bpl") -runtest("Frame1.bpl") -runtest("LogicalExprs.bpl") -runtest("Arrays.bpl") -runtest("WhereTyping.bpl") -runtest("Family.bpl") -runtest("AttributeTyping.bpl") -runtest("UpdateExprTyping.bpl") -runtest("MapsTypeErrors.bpl") -runtest("Orderings.bpl") -runtest("EmptyCallArgs.bpl") -runtest("FunBody.bpl") -runtest("IfThenElse0.bpl") -runtest("Lambda.bpl") -runtest("IntReal.bpl") - -# compare the output with the expected answers -test_file = open("Output").readlines() -correct_file = open("Answer").readlines() - -for test, correct in zip(test_file, correct_file): - if test.strip(' \t\n\r') != correct.strip(' \t\n\r'): - print "\n===== " + os.getcwd().split(os.sep)[-1] + ": FAILED" - break -else: - print "\n===== " + os.getcwd().split(os.sep)[-1] + ": PASSED" -- cgit v1.2.3