diff options
author | Don Bright <hugh.m.bright@gmail.com> | 2011-09-18 22:53:33 (GMT) |
---|---|---|
committer | Don Bright <hugh.m.bright@gmail.com> | 2011-09-18 22:53:33 (GMT) |
commit | 0b219ae4b46bbab5593d0ee644d7f6bcdb36d17e (patch) | |
tree | 83da7c12741a0409531657cac4a4217cf8e76727 /tests/test_cmdline_tool.py | |
parent | 6d70855a4d92a7aafbc21fdd97c570e9ef227182 (diff) |
opencsg testing
Diffstat (limited to 'tests/test_cmdline_tool.py')
-rwxr-xr-x | tests/test_cmdline_tool.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/test_cmdline_tool.py b/tests/test_cmdline_tool.py index 7f68775..07afcc8 100755 --- a/tests/test_cmdline_tool.py +++ b/tests/test_cmdline_tool.py @@ -47,8 +47,8 @@ def execute_and_redirect(cmd, params, outfile): try: proc = subprocess.Popen([cmd] + params, stdout=outfile) retval = proc.wait() - except OSError as (errno, strerror): - print >> sys.stderr, "Error: ", errno, strerror + except: + print >> sys.stderr, "Error running subprocess: ", sys.exc_info()[1] print >> sys.stderr, " cmd:", cmd print >> sys.stderr, " params:", params print >> sys.stderr, " outfile:", outfile @@ -68,6 +68,10 @@ def compare_default(resultfilename): return True def compare_png(resultfilename): + if not resultfilename: + print >> sys.stderr, "Error: OpenSCAD did not generate an image" + return False + print >> sys.stderr, 'Yee image compare: ', expectedfilename, ' ', resultfilename if execute_and_redirect("./yee_compare", [expectedfilename, resultfilename], sys.stderr) != 0: return False return True |