[llvm-commits] [klee] r72471 - /klee/trunk/tools/ktest-tool/ktest-tool
Daniel Dunbar
daniel at zuster.org
Wed May 27 09:01:29 PDT 2009
Author: ddunbar
Date: Wed May 27 11:01:09 2009
New Revision: 72471
URL: http://llvm.org/viewvc/llvm-project?rev=72471&view=rev
Log:
Some more updates for bout -> ktest renaming.
Modified:
klee/trunk/tools/ktest-tool/ktest-tool
Modified: klee/trunk/tools/ktest-tool/ktest-tool
URL: http://llvm.org/viewvc/llvm-project/klee/trunk/tools/ktest-tool/ktest-tool?rev=72471&r1=72470&r2=72471&view=diff
==============================================================================
--- klee/trunk/tools/ktest-tool/ktest-tool (original)
+++ klee/trunk/tools/ktest-tool/ktest-tool Wed May 27 11:01:09 2009
@@ -6,10 +6,10 @@
version_no=2
-class BOutError(Exception):
+class KTestError(Exception):
pass
-class BOut:
+class KTest:
@staticmethod
def fromfile(path):
if not os.path.exists(path):
@@ -19,10 +19,10 @@
f = open(path,'rb')
hdr = f.read(5)
if len(hdr)!=5 or hdr!='BOUT\n':
- raise BOutError,'unrecognized file'
+ raise KTestError,'unrecognized file'
version, = struct.unpack('>i', f.read(4))
if version > version_no:
- raise BOutError,'unrecognized version'
+ raise KTestError,'unrecognized version'
numArgs, = struct.unpack('>i', f.read(4))
args = []
for i in range(numArgs):
@@ -46,7 +46,7 @@
objects.append( (name,bytes) )
# Create an instance
- b = BOut(version, args, symArgvs, symArgvLen, objects)
+ b = KTest(version, args, symArgvs, symArgvLen, objects)
# Augment with extra filename field
b.filename = path
return b
@@ -59,7 +59,7 @@
self.objects = objects
# add a field that represents the name of the program used to
- # generate this .bout file:
+ # generate this .ktest file:
program_full_path = self.args[0]
program_name = os.path.basename(program_full_path)
# sometimes program names end in .bc, so strip them
@@ -85,9 +85,9 @@
op.error("incorrect number of arguments")
for file in args:
- b = BOut.fromfile(file)
+ b = KTest.fromfile(file)
pos = 0
- print 'bout file : %r' % file
+ print 'ktest file : %r' % file
print 'args : %r' % b.args
print 'num objects: %r' % len(b.objects)
for i,(name,data) in enumerate(b.objects):
More information about the llvm-commits
mailing list