[Swan-dev] swantest bug

D. Hugh Redelmeier hugh at mimosa.com
Mon Jul 20 17:29:09 EEST 2015


| From: D. Hugh Redelmeier <hugh at mimosa.com>

| I ran a "make UPDATE=1 check".  It failed with a python error about seven
| hours later.  It is in the code that summarizes the results.

| Line 811 in swantest is obviously wrong: it is in an ELSE clause
| of an IF that tests for "expect" in test.  So we know there is no
| "expect", and yet 811 tries to print test["expect"].

Here's a patch that prevents crashing.  I know this after another 8
hours of testing :-)

I have no idea if the resulting output is useful.

================
diff --git a/testing/utils/swantest b/testing/utils/swantest
index 605eb29..a5a76c5 100755
--- a/testing/utils/swantest
+++ b/testing/utils/swantest
@@ -808,7 +808,7 @@ class scantests:
                         test["result"], test["expect"], test["name"], st1, st2)
             else:
                 line = "%s %s\t%s, %s, %s" % (
-                    test["result"], test["expect"], test["name"], st1, st2)
+                    test["result"], "unknown", test["name"], st1, st2)
         else:
             line = "%s no result" % test["name"]
         return line
================


More information about the Swan-dev mailing list