Skip to content
Snippets Groups Projects
Commit 14e29fd7 authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Make diagnostics go to stderr.

parent b35ee46b
No related branches found
No related tags found
No related merge requests found
...@@ -81,7 +81,7 @@ def generate(decl): ...@@ -81,7 +81,7 @@ def generate(decl):
elif decl.__class__ == labcomm.STRING: elif decl.__class__ == labcomm.STRING:
return ['string', u'sträng' ] return ['string', u'sträng' ]
print decl print>>sys.stderr, decl
raise Exception("unhandled decl %s" % decl.__class__) raise Exception("unhandled decl %s" % decl.__class__)
def labcomm_compile(lc, name, args): def labcomm_compile(lc, name, args):
...@@ -118,7 +118,7 @@ class Test: ...@@ -118,7 +118,7 @@ class Test:
pass pass
def run(self): def run(self):
print 'Testing', self.program print>>sys.stderr, 'Testing', self.program
p = subprocess.Popen(self.program, p = subprocess.Popen(self.program,
stdin=subprocess.PIPE, stdin=subprocess.PIPE,
stdout=subprocess.PIPE) stdout=subprocess.PIPE)
...@@ -132,8 +132,7 @@ class Test: ...@@ -132,8 +132,7 @@ class Test:
encoder.add_decl(signature) encoder.add_decl(signature)
pass pass
for name,signature in self.signatures: for name,signature in self.signatures:
print "Checking", name, print>>sys.stderr, "Checking", name,
sys.stdout.flush()
for decl,value in generate(signature): for decl,value in generate(signature):
sys.stdout.write('.') sys.stdout.write('.')
#print name,decl,value,value.__class__ #print name,decl,value,value.__class__
...@@ -144,7 +143,7 @@ class Test: ...@@ -144,7 +143,7 @@ class Test:
p.terminate() p.terminate()
exit(1) exit(1)
pass pass
print print>>sys.stderr
pass pass
p.stdin.close() p.stdin.close()
if p.wait() != 0: if p.wait() != 0:
...@@ -159,7 +158,7 @@ class Test: ...@@ -159,7 +158,7 @@ class Test:
value,decl = decoder.decode() value,decl = decoder.decode()
if value != None: if value != None:
if value != self.expected: if value != self.expected:
print "Coding error", value, self.expected, decl print>>sys.stderr, "Coding error", value, self.expected, decl
self.failed = True self.failed = True
self.next.release() self.next.release()
pass pass
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment