diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2001-02-15 01:23:55 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2001-02-15 01:23:55 +0000 |
commit | 1dc72d18cd90340bf4376591180b6958ea863bf3 (patch) | |
tree | e2a7ac7eed078ca8189cae6e772e7a6bca128a2f /torturetest.py | |
parent | b37a327a1a8441f85821e0798c0875ae1ed81a75 (diff) | |
download | fetchmail-1dc72d18cd90340bf4376591180b6958ea863bf3.tar.gz fetchmail-1dc72d18cd90340bf4376591180b6958ea863bf3.tar.bz2 fetchmail-1dc72d18cd90340bf4376591180b6958ea863bf3.zip |
We can actually report failed tests now.
svn path=/trunk/; revision=3099
Diffstat (limited to 'torturetest.py')
-rwxr-xr-x | torturetest.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/torturetest.py b/torturetest.py index a27b358f..6dccb5ea 100755 --- a/torturetest.py +++ b/torturetest.py @@ -76,14 +76,14 @@ class TestSite: def failed(self): "Did we have a test failure here?" - return os.WIFEXITED(self.status) or os.WEXITSTATUS(self.status) > 1 + return os.WIFEXITED(self.status) and os.WEXITSTATUS(self.status) > 1 def explain(self): "Explain the status of the last test." if not os.WIFEXITED(self.status): return self.id() + ": abnormal termination\n" elif os.WEXITSTATUS(self.status) > 1: - return self.id() + ": %d\n" % os.WEXITSTATUS(status) + self.output + return self.id() + ": %d\n" % os.WEXITSTATUS(self.status) + self.output else: return self.id() + ": succeeded\n" @@ -115,7 +115,7 @@ if __name__ == "__main__": # Probe a single site selected = [] for site in sitelist: - if site.id().find(value) > -1: + if `site`.find(value) > -1: selected.append(site) sitelist = selected # Fall through @@ -161,11 +161,8 @@ if __name__ == "__main__": print "Bad status was returned on the following sites:" for site in sitelist: if site.failed(): - sys.stdout.write(self.explain) + sys.stdout.write(site.explain()) except KeyboardInterrupt: print "Interrupted." # end - - - |