commit/galaxy-central: carlfeberhard: QA, browser tests: dump stdout if casper didn't return good JSON

1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/cb95dad5175e/ Changeset: cb95dad5175e User: carlfeberhard Date: 2013-09-19 21:56:29 Summary: QA, browser tests: dump stdout if casper didn't return good JSON Affected #: 1 file diff -r 3a15758ba67e2429698184a4300c9608c65ce06d -r cb95dad5175ec10cf191bddcaf2e1d115546dd7c test/casperjs/casperjs_runner.py --- a/test/casperjs/casperjs_runner.py +++ b/test/casperjs/casperjs_runner.py @@ -176,7 +176,14 @@ err_string = ( "%s\n%s" %( get_msg( last_error ), self.browser_backtrace_to_string( get_trace( last_error ) ) ) ) - # if we couldn't parse json from what's returned on the error, raise a vanilla exc + # if we couldn't parse json from what's returned on the error, dump stdout + except ValueError, val_err: + if str( val_err ) == 'No JSON object could be decoded': + log.debug( '(error parsing returned JSON from casperjs, dumping stdout...)\n:%s', stdout_output ) + else: + raise + + # otherwise, raise a vanilla exc except Exception, exc: log.debug( '(failed to parse error returned from %s: %s)', _PATH_TO_HEADLESS, str( exc ) ) return HeadlessJSJavascriptError( Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
commits-noreply@bitbucket.org