diff options
author | Don Bright <hugh.m.bright@gmail.com> | 2011-09-17 21:13:37 (GMT) |
---|---|---|
committer | Don Bright <hugh.m.bright@gmail.com> | 2011-09-17 21:13:37 (GMT) |
commit | 6d70855a4d92a7aafbc21fdd97c570e9ef227182 (patch) | |
tree | cf5c3ff4d89e8e6aa5863c7c2fe2035981bc0929 /tests/test_cmdline_tool.py | |
parent | 78bf15d0858ca6ed892872d1cd08c9ef4b8ae63b (diff) |
added png and image comparison, enabling testing on linux
Diffstat (limited to 'tests/test_cmdline_tool.py')
-rwxr-xr-x | tests/test_cmdline_tool.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/test_cmdline_tool.py b/tests/test_cmdline_tool.py index b8a0d07..7f68775 100755 --- a/tests/test_cmdline_tool.py +++ b/tests/test_cmdline_tool.py @@ -43,8 +43,15 @@ def verify_test(testname, cmd): return True def execute_and_redirect(cmd, params, outfile): - proc = subprocess.Popen([cmd] + params, stdout=outfile) - retval = proc.wait() + retval = -1 + try: + proc = subprocess.Popen([cmd] + params, stdout=outfile) + retval = proc.wait() + except OSError as (errno, strerror): + print >> sys.stderr, "Error: ", errno, strerror + print >> sys.stderr, " cmd:", cmd + print >> sys.stderr, " params:", params + print >> sys.stderr, " outfile:", outfile return retval def get_normalized_text(filename): @@ -61,7 +68,7 @@ def compare_default(resultfilename): return True def compare_png(resultfilename): - if execute_and_redirect("diff", [expectedfilename, resultfilename], sys.stderr) != 0: + if execute_and_redirect("./yee_compare", [expectedfilename, resultfilename], sys.stderr) != 0: return False return True |